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!

SQLCommand.ActiveConnection

Gets or sets the SQLConnection used by this instance of the SQLCommand.

[Visual Basic]
Public Property ActiveConnection As SQLConnection
[C#]
public SQLConnection ActiveConnection {get; set;}
[C++]
public: __property SQLConnection* get_ActiveConnection();
public: __property void set_ActiveConnection(SQLConnection*);
[JScript]
public function get ActiveConnection() : SQLConnection;
public function set ActiveConnection(SQLConnection);

Property Value

The connection to a data source. The default value is a null reference (in Visual Basic Nothing).

Remarks

This property is not cloned, but copied. The connection properties are reset every time a new connection is assigned.

Example

The following example creates a SQLCommand and sets some of its properties.

See Also

SQLCommand Class | SQLCommand Members | System.Data.SQL Namespace | CommandText | CommandTimeout | CommandType | CommandBehavior