SQL Server 2000 changes name of RETURN_VALUE to @RETURN_VALUE (285295)
The information in this article applies to:
- Microsoft Data Access Components 2.6
- Microsoft Data Access Components 2.7
- Microsoft Data Access Components 2.8
- Microsoft SQL Server 7.0
- Microsoft SQL Server 2000 (all editions)
- Microsoft Visual Basic Professional Edition for Windows 6.0
- Microsoft Visual Basic Enterprise Edition for Windows 6.0
This article was previously published under Q285295 SYMPTOMS When working with parameterized SQL Server stored
procedures by using a data access technology such as ActiveX Data Objects
(ADO), the members of the Parameters collection of the ADO Command object can
be referenced by using either the name of the parameter or its numeric index
into the Parameters collection. Every SQL Server stored procedure has
a return value parameter (whether it is explicitly used or not) that is the
first parameter (index of 0) in the Parameters collection of the ADO Command
object. SQL Server 7.0 used RETURN_VALUE as the name of this parameter. However, SQL Server 2000 uses @RETURN_VALUE. This change may break existing applications that rely on the
parameter name. If you run the INSTCAT.SQL script included with MDAC
2.6, MDAC
2.7,
or MDAC 2.8 against SQL Server 7.0, this script will
change the parameter name to @RETURN_VALUE for this SQL Server 7.0 installation
as well.
For additional information about the role of the INSTCAT.SQL
script, click the following article number to view the article in the Microsoft Knowledge Base:
137636
Relationship of the ODBC driver to INSTCAT.SQL
CAUSE This change in behavior is the result of changes to the
system stored procedure, sp_params_rowset, in SQL Server 2000.
Note Users should not edit the system stored procedures in an attempt
to rectify this problem. RESOLUTION As a result of this change, it is not possible to refer to
the return value parameter by name in such a way that client application code
works with both SQL Server 7.0 and SQL Server 2000. STATUS
This behavior is by design.
Modification Type: | Minor | Last Reviewed: | 12/15/2004 |
---|
Keywords: | kbDatabase kbMDACNoSweep kbnofix kbprb kbStoredProc KB285295 |
---|
|