NGWS SDK Documentation  

This is preliminary documentation and subject to change.
To comment on this topic, please send us email at ngwssdk@microsoft.com. Thanks!

ADOCommand Constructor (ADOConnection, String, CommandType, Boolean, ADOParameter[], UpdateRowSource)

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
);

Parameters

activeConnection
An ADOConnection that represents the connection.
cmdText
The text of the query command.
cmdType
A value that is one of the CommandType values.
namedParameters
true if named parameters are being used, otherwise false.
parameters
An array of ADOParameter objects.
updatedRowSource
A value that is one of the UpdateRowSource values.

Remarks

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.

Example

The following example creates an ADOCommand and sets some of its properties.

See Also

ADOCommand Class | ADOCommand Members | System.Data.ADO Namespace | ADOCommand Constructor Overload List