ADO.NET OLEDB Connection
An instance of the OleDbConnection class in .NET Framework is supported the OLEDB Data Provider. The OleDbConnection instance takes Connection String as argument and pass the value to the Constructor statement. When the connection is established , SQL Commands may be executed, with the help of the Connection Object, to retrieve or manipulate data in the database.
Once the Database activities over , Connection should be closed and release the resources . The Close() method in SqlConnection class is used to close the Database Connection. The Close method rolls back any pending transactions and releases the Connection from the Database connected by the OLEDB Data Provider.
You have to provide the necessary informations to the Connection String.
connetionString = "Provider = Microsoft.Jet.OLEDB.4.0; Data Source = yourdatabasename.mdb;"
From the above statement replace yourdatabasename.mdb to the actual names.
- ADO.NET Connection Object
- ADO.NET SQL Server Connection
- ADO.NET ODBC Connection
- ADO.NET Command
- ADO.NET ExecuteNonQuery in SqlCommand Object
- ADO.NET ExecuteNonQuery in OleDbCommand Object
- ADO.NET ExecuteScalar in SqlCommand Object
- ADO.NET ExecuteScalar in OleDbCommand Object
- ADO.NET ExecuteReader in SqlCommand Object
- ADO.NET ExecuteReader in OleDbCommand Object
- How to ADO.NET DataReader
- How to ADO.NET SqlDataReader
- How to ADO.NET OleDbDataReader
- How to Multiple Result Sets in ADO.NET
- Getting Schema Informations from SqlDataReader
- Getting Schema Informations from OleDbDataReader
- What is DataAdapter
- What is SqlDataAdapter
- What is OleDbDataAdapter
- Vb.NET ExecuteReader and ExecuteNonQuery