![]() ![]() | ||
The OleDbDataConnection class represents a connection to an OLE DB data source. Here is the inheritance hierarchy of this class:
Object MarshalByRefObject Component OleDbConnection
You can find the more notable public properties of OleDbConnection objects in Table 22.1, their more notable methods in Table 22.2, and their more notable events in Table 22.3.
Property |
Means |
---|---|
ConnectionString |
Gets/sets the connection string to open a database. |
ConnectionTimeout |
Gets the amount of time to wait trying to make a connection. |
Database |
Gets the name of the database to open. |
DataSource |
Gets the data source (usually the location and file name to open). |
Provider |
Gets the OLE DB provider's name. |
ServerVersion |
Gets the version of the server. |
State |
Gets the connection's current state. |
Method |
Means |
---|---|
BeginTransaction |
Starts a database transaction. |
ChangeDatabase |
Changes the current database. |
Close |
Closes the connection to the data provider. |
CreateCommand |
Creates an OleDbCommand object for this connection. |
GetOleDbSchemaTable |
Returns the current schema table. |
Open |
Opens a database connection. |
Event |
Means |
---|---|
InfoMessage |
Occurs if the provider sends a message (including warnings). |
StateChange |
Occurs when a connection's state changes. |
![]() ![]() | ||