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 (String, ADOConnection)

Initializes a new instance of the ADOCommand class with the query command text and an ADOConnection.

[Visual Basic]
Overloads Public Sub New( _
   ByVal cmdText As String, _
   ByVal connection As ADOConnection _
)
[C#]
public ADOCommand(
   string cmdText,
   ADOConnection connection
);
[C++]
public: ADOCommand(
   String* cmdText,
   ADOConnection* connection
);
[JScript]
public function ADOCommand(
   cmdText : String,
   connection : ADOConnection
);

Parameters

cmdText
The text of the query command.
connection
An ADOConnection that represents the connection.

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 CommandType.Text
ActiveConnection A new ADOConnection that is connection.
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