PRB: Missing Parameter Error Running Stored Procedure from ADO (193348)
The information in this article applies to:
- ActiveX Data Objects (ADO) 1.5
- ActiveX Data Objects (ADO) 2.0
- ActiveX Data Objects (ADO) 2.1 SP2
- ActiveX Data Objects (ADO) 2.5
- ActiveX Data Objects (ADO) 2.6
- ActiveX Data Objects (ADO) 2.7
This article was previously published under Q193348 SYMPTOMS
When you execute a stored procedure through an ActiveX Data Objects (ADO)
Command object that is referenced through an ADO Connection object, the following error can occur:
Run-time error -2147217900 (80040e14), "Procedure <procedure name>
expects parameter <parameter name>, which was not supplied".
CAUSE
When 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.
RESOLUTION
Make sure that the Name property is set on a Command object before
attempting to reference it through the Connection object.
STATUS
Microsoft has confirmed this to be a problem in ActiveX Data Objects
versions 1.5 and 2.0 for Windows.
Modification Type: | Minor | Last Reviewed: | 3/2/2005 |
---|
Keywords: | kbcode kbDSupport kbprb KB193348 |
---|
|