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();
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. |
The following example creates a connection, opens it, begins a transaction, saves the transaction, commits the transaction, rollsback the transaction, then closes the connection.
SQLConnection Class | SQLConnection Members | System.Data.SQL Namespace | Close