Incorrect parameter information is returned when you call the GetParameterInfo method, and the command text is set to an ODBC call escape sequence (884437)
The information in this article applies to:
- Microsoft Data Access Components 2.8
SYMPTOMSWhen you use the GetParameterInfo method, and the command text is set to an Open Database Connectivity
(ODBC) call escape sequence to obtain parameter information from a stored
procedure, incorrect parameter information is returned. For example, when you set the
command text to the following ODBC call escape sequence, the
information that is returned is about the first parameter instead of about the last parameter. {call yourStoredProcedure(,,,?)} Note yourStoredProcedure is a placeholder for one of your stored procedures. In this example, you are requesting information about the last parameter from the yourStoredProcedure stored procedure. However, information about the first parameter is returned instead. CAUSEThis problem occurs because a problem in the Microsoft OLE
DB Provider for SQL Server (SQLOLEDB) client causes all the parameter
information except for the first parameter to be discarded. WORKAROUNDTo work around this problem, use one of the following methods: - Use the Microsoft SQL Server ODBC driver. When you use the SQL
Server ODBC driver, the GetParameterInfo method works as expected.
- Use Transact-SQL as the
command text. To do this, use the SetCommandText method to set the command text to code that is similar to the
following code.
exec ?=yourStoredProcedure ,,,,?
STATUSMicrosoft
has confirmed that this is a problem in the Microsoft products that are listed
in the "Applies to" section.REFERENCESFor more information, visit the following Microsoft Developer Network (MSDN)
Web site:
Modification Type: | Major | Last Reviewed: | 4/13/2005 |
---|
Keywords: | KBSQLServ2005fix kbtshoot kbBug kbnofix kbprb KB884437 kbAudDeveloper |
---|
|