Initializes a new instance of the ADOCommand class with an ADOConnection, the query command text, a specific CommandType, a parameter array, and a UpdateRowSource value.
[Visual Basic] Overloads Public Sub New( _ ByVal activeConnection As ADOConnection, _ ByVal cmdText As String, _ ByVal cmdType As CommandType, _ ByVal namedParameters As Boolean, _ ByVal parameters() As ADOParameter, _ ByVal updatedRowSource As UpdateRowSource _ ) [C#] public ADOCommand( ADOConnection activeConnection, string cmdText, CommandType cmdType, bool namedParameters, ADOParameter[] parameters, UpdateRowSource updatedRowSource ); [C++] public: ADOCommand( ADOConnection* activeConnection, String* cmdText, CommandType cmdType, bool namedParameters, ADOParameter* parameters[], UpdateRowSource updatedRowSource ); [JScript] public function ADOCommand( activeConnection : ADOConnection, cmdText : String, cmdType : CommandType, namedParameters : Boolean, parameters : ADOParameter[], updatedRowSource : UpdateRowSource );
When an instance of ADOCommand is created, the following read/write properties are set to initial values.
Properties | Initial Value |
---|---|
CommandText | cmdText |
CommandTimeout | 30 |
CommandType | cmdType |
ActiveConnection | activeConnection |
RowFetchCount | 1 |
NamedParameters | false |
CommandBehavior | 0 |
You can change the value for any of these properties through a separate call to the property.
The following example creates an ADOCommand and sets some of its properties.
ADOCommand Class | ADOCommand Members | System.Data.ADO Namespace | ADOCommand Constructor Overload List