GetConnection Method (DbProvider)
Overload List
Overload | Description |
---|---|
GetConnection() | Gets an IDbConnection object instance of the correct type for the underlying database (i.e. SqlConnection for MSSQL) that is prepared to connect to the specified database using the default connection string specified in the application configuration file. |
GetConnection(String) | Gets an IDbConnection object instance of the correct type for the underlying database (i.e. SqlConnection for MSSQL) that is prepared to connect to the specified database using the specified connection string. |
Remarks
The connection instance is not open by default. In order to open the connection, use the Open method on the IDbConnection reference returned by this method.
Requirements
Platforms: Windows 98, Windows NT 4.0, Windows Millennium Edition, Windows 2000, Windows XP Home Edition, Windows XP Professional, Windows Server family