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.Open

Opens a database connection with the current property settings.

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

Exceptions

Exception Type Condition
Exception The dataSource property was not set or was set incorrectly.
BrokenConError The connection is broken.
ConnectionAlreadyOpen The connection is already open.

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 | Close