Microsoft KB Archive/319126

= BUG: Running a Stored Procedure by Using a Remote Procedure Call May Cause an Exception in the int_sendreturnparam Function =

Article ID: 319126

Article Last Modified on 12/13/2002

-

APPLIES TO


 * Microsoft SQL Server 7.0 Standard Edition

-



This article was previously published under Q319126



BUG #: 102240 (SQLBUG_70)



SYMPTOMS
If you run a stored procedure by using a Remote Procedure Call (RPC) (for example through an ADO Command object), an Exception Access Violation (AV) may occur if all of the following conditions are met:
 * A Command object is defined with an input-output type of parameter.


 * The same Command object parameter is defined without a default value.


 * The stored procedure definition includes a default value definition for an output parameter.

You may see the following error message in the SQL Server error log:

Error: 0, Severity: 19, State: 0 execrpc: Process 9 generated an access violation. SQL Server is terminating this process.

The stack dump in the SQL Server error log may look similar to the following if you are using SQL Server 7.0 Service Pack 3: Short Stack Dump 0x41075e49 Module(opends60+15e49) (int_sendreturnparam+755) 0x410698a5 Module(opends60+98a5) (sendReturnValues+5a) 0x41061a43 Module(opends60+1a43) (sendParams+2c) 0x410619f5 Module(opends60+19f5) (srv_completioncode+68)



WORKAROUND
To work around this behavior you can either:   Replace any lines of code similar to MyCommandObject.Parameters.Append MyCommandObject.CreateParameter(&quot;@parameter1&quot;, adInteger, adParamInputOutput) with any of the following:   MyCommandObject.Parameters.Append MyCommandObject.CreateParameter(&quot;@parameter1&quot;, adInteger, adParamInput) -or-   -or- Dim nParameter1 As Integer MyCommandObject.Parameters.Append MyCommandObject.CreateParameter(&quot;@parameter1&quot;, adInteger, adParamInputOutput,, nParameter1) -or-   -or- MyCommandObject.Parameters.Append MyCommandObject.CreateParameter(&quot;@parameter1&quot;, adInteger, adParamInputOutput,, Null) 

-or-

 with any of the following: Upgrade to Microsoft SQL Server 2000.</li></ul>

<div class="status_section">

STATUS
Microsoft has confirmed that this is a problem in SQL Server 7.0.

Additional query words: exception AV int_sendreturnparam ADO access violation Command adParamIntputOutput

Keywords: kbbug kbpending KB319126

-

[mailto:TECHNET@MICROSOFT.COM Send feedback to Microsoft]

© Microsoft Corporation. All rights reserved.