fMay be something like this, create a connection and than read from your access file.
OleDbConnection conn;
OleDbCommand comm;
OleDbDataReader dr;
conn = new OleDbConnection("Provider = Microsoft.Jet.OLEDB.4.0; Data Source = C:\\db1.mdb");
comm = new OleDbCommand("Select * from Table1 where loginId =@id and password=@pass",conn);
comm.Parameters.Add(new OleDbParameter("@id",System.Data.oleDbType.NVarChar,20, "loginID"));
comm.Parameters.Add(new OleDbParameter("@pass",System.Data.oleDbType.NVarChar,20, "password"));
conn.Open();
dr = comm.ExecuteReader();
conn.Close();
if(dr.hasrows)
{
//login success
}
else
//login fail
Than you can authenticate by using dr against the user input. Put this above your commented line.
Thurein
2010-07-20 01:41:26