PRB: "Run-time Error 3001" with ADO Command Object and adCmdTableDirect (248076)
The information in this article applies to:
- ActiveX Data Objects (ADO) 2.0
- ActiveX Data Objects (ADO) 2.01
- ActiveX Data Objects (ADO) 2.1
- ActiveX Data Objects (ADO) 2.1 SP1
- 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 Q248076 SYMPTOMS If you attempt to open an ADO Recordset using the Execute
method of an ADO Command object, while specifying a Recordset option of adCmdTableDirect, the following error appears:
"Run-time error '3001': The application is using
arguments that are of the wrong type, are out of acceptable range, or are in
conflict with one another." The error also occurs if you attempt to
set the CommandType property of an ADO Command object to adCmdTableDirect.
The error does not occur when specifying adCmdTable. CAUSE adCmdTableDirect is not compatible with the ADO Command
object. adCmdTableDirect specifies that ADO uses an interface called
IOpenRowset instead of an ADO Command object. RESOLUTION There are two possible workarounds:
- Specify adCmdTableDirect in the Open method of an ADO
Recordset.
- Specify a CommandType of adCmdText or adCmdTable.
However, this would result in reduced functionality in situations where using
adCmdTableDirect is an option.
STATUS This behavior is by design.
Modification Type: | Minor | Last Reviewed: | 4/22/2003 |
---|
Keywords: | kbDatabase kbprb KB248076 kbAudDeveloper |
---|
|