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!

ADOConnection.Close ()

Closes the connection to the data source. This is the preferred method.

[Visual Basic]
Overloads Overrides Public Sub Close()
[C#]
public override void Close();
[C++]
public: override void Close();
[JScript]
public override function Close();

Exceptions

Exception Type Condition
ConnectionAlreadyClosed The connection was already in a closed state.
ConnectionTooBusyToClose A transaction is still being processed.

Remarks

This method tries to close the connection nicely by waiting for all transactions to clear first.

Example

The following example creates a connection, opens it, begins a transaction, commits the transaction, rollsback the transaction, then closes the connection.

See Also

ADOConnection Class | ADOConnection Members | System.Data.ADO Namespace | ADOConnection.Close Overload List | Open