System.Data.OleDb Namespace OleDbConnection Class
Initializes a new instance of the OleDbConnection class.
[ VB ]
Overloads Public Sub New ( )
[ C# ]
public OleDbConnection ( );
[ C++ ]
public: OleDbConnection ( );
[ JScript ]
public function OleDbConnection ( )
When an instance of OleDbConnection is created, the following read/write properties are set to initial values, unless they are specifically set using their associated keywords in the ConnectionString property.
You can change the value for these properties only by using the ConnectionString property.
The following example initializes and opens an OleDbConnection using this constructor.
OleDbConnection myConn = new OleDbConnection ( );
myConn.ConnectionString = "Provider=Microsoft.ACE.OLEDB.12.0; Data Source=myData.mdb";
myConn.Open ( );
Dim myConn As New OleDbConnection ( )
myConn.ConnectionString = "Provider=Microsoft.ACE.OLEDB.12.0; Data Source=myData.mdb"
myConn.Open ( ) |
|
C# |
VB |
OleDbConnection Members ConnectionString OleDbConnection Constructor Overload List