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);
The connection to a data source. The default value is a null reference (in Visual Basic Nothing).
This property is not cloned, but copied. The connection properties are reset every time a new connection is assigned.
The following example creates a SQLCommand and sets some of its properties.
SQLCommand Class | SQLCommand Members | System.Data.SQL Namespace | CommandText | CommandTimeout | CommandType | CommandBehavior