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!

DBConnection.Close

Closes the connection to the database.

[Visual Basic]
MustOverride Public Sub Close()
[C#]
public abstract void Close();
[C++]
public: virtual void Close() = 0;
[JScript]
public abstract function Close();

Exceptions

Exception Type Condition
ADP.ConnectionAlreadyClosed The connection was already in a closed state.
Data.DBObjectState) A transaction is still being processed.

Remarks

Notes to Inheritors: When overridden, Close will close the connection to the data source.

Example

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

See Also

DBConnection Class | DBConnection Members | System.Data.Internal Namespace | Open