The information in this article applies to:
SYMPTOMSWhen you execute a stored procedure through an ActiveX Data Objects (ADO) Command object referenced through an ADO Connection object, the following error can occur:
CAUSEWhen executing the ConnectionObject.CommandName, ADO first looks for a Command object whose Name property is CommandName, and then it searches for a stored procedure called CommandName. If a Command object is created with the appropriate parameters appended to its Parameters collection, but the Name property is not set, then this Command object will not be used as intended when executing the stored procedure, which results in the error shown in the SYMPTOMS section. RESOLUTIONMake sure that the Name property is set on a Command object before attempting to reference it through the Connection object. STATUSMicrosoft has confirmed this to be a problem in ActiveX Data Objects versions 1.5 and 2.0 for Windows. MORE INFORMATIONSteps to Reproduce BehaviorThis sample assumes that there is an ODBC data source name (DSN), named "Test", for a database containing a stored procedure called "TestProc." The following SQL defines TestProc in Microsoft SQL Server:
In order to get the following code to execute without error, uncomment the
following line:
Sample Code
Additional query words:
Keywords : kbADO150 kbADO200 kbGrpVBDB kbGrpMDAC kbDSupport kbADO210sp2 |
Last Reviewed: November 13, 1999 © 2000 Microsoft Corporation. All rights reserved. Terms of Use. |