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!

SQLConnection.Close

Closes the connection to the database.

[Visual Basic]
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 is already closed.
PendingTransaction A transaction is still processing.
Exception The connection could not be closed.

Example

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

See Also

SQLConnection Class | SQLConnection Members | System.Data.SQL Namespace | Open