Step 1: Include the following namespace
using System.Data.OleDb;
Step2: create the connection string
string ConnStr = @"Provider=Microsoft.ACE.OLEDB.12.0;Data Source=C:\Users\Pawan\Desktop\database.mdb;Jet OLEDB:Database Password=12345";
Step3: making a connection
OleDbConnection MyConn =
new OleDbConnection(ConnStr);
MyConn.Open();
OleDbCommand Cmd = new
OleDbCommand(ConnStr, MyConn);
Step4: reading the value
from acces database
OleDbDataReader ObjReader = Cmd.ExecuteReader();

Join the conversation! Your thoughts help the community grow.