Opens a new connection to a database with the property settings specified by the ConnectionString.
The FbConnection draws an open connection from the connection pool if one is available. Otherwise, it establishes a new connection to the database.
Note:
If a FbConnection object goes out of scope, the connection it represents does not close automatically, you need to explicitly close the connection by calling Close or Dispose methods.
Exception Type | Condition |
---|---|
InvalidOperationException | The connection is already open. |
ArgumentException | If Connection string is not valid. |
FbException | A connection-level error occurred while opening the connection. |
FbConnection Class | FirebirdSql.Data.Firebird Namespace