Hai
First u have use select data from database and fill into data table,and check row count,if it is above 1 then database have row,use where condition for select query then only u find exact data exit or not.
for examble
OleDbConnection cn;
OleDbCommand cmd2;
cn = new OleDbConnection("Provider=Microsoft.Jet.OLEDB.4.0; Data Source=" your dbpath herer ";Jet OLEDB:");
cn.Open();
OleDbDataAdapter objDA = new OleDbDataAdapter("select * from Users where UserId='007'", cn);
DataTable objDT = new DataTable();
objDA.Fill(objDT);
if ((objDT.Rows.Count == 1)) {
}
the above code for select exact data from table,here users is table,but u want database have data or not
try like this
OleDbConnection cn;
OleDbCommand cmd2;
cn = new OleDbConnection("Provider=Microsoft.Jet.OLEDB.4.0; Data Source=" your dbpath herer ";Jet OLEDB:");
cn.Open();
OleDbDataAdapter objDA = new OleDbDataAdapter("select * from Users", cn);
DataTable objDT = new DataTable();
objDA.Fill(objDT);
if ((objDT.Rows.Count == 1)) {
}
Regards
Aravind