please follow following link
http://www.codeproject.com/cs/database/linkAccessInCSharp.asp
or write following code
using System;
using System.Data;
using System.Data.OleDb;
public class Test{
public static void Main()
{
string source = "Provider=Microsoft.JET.OLEDB.4.0;" + "data source=""C:\\Winnt\\Profiles\\Administrator\\Personal\\db2.mdb
string command="SELECT Name, Assets FROM Bank_customer_data";
OleDbCommand mCommand = new OleDbCommand();
OleDbConnection mConnection=new OleDbConnection(source);
mConnection.Open();
mCommand.ActiveConnection=mConnection;
mCommand.CommandText=command;
OleDbDataReader mReader;
mCommand.Execute(out mReader);
// Use Read to read data line by line.
while (mReader.Read())
{ //The data is extracted with the methods GetString and GetInt32
Console.WriteLine(mReader.GetString(0) + ":" + mReader.GetInt32(1));
}
// Close the Reader when done.
mReader.Close();
// Close the connection when done.
mConnection.Close();
}
}