I am working on application where I got to access data from 2 sheets, get the account number from first sheet and then look for those accounts in sheet 2.
I am using OleDbDataAdapter
to select and count the number of occurrance but now the issue is to access those records out of all.
One way I am thinking is to get the first occurrance row number, number of rows with specific account and use for loop to access each row.
Is there any other method you think of doing this.... Thanks,
oconn2.Open();
OleDbDataAdapter db = new OleDbDataAdapter("select * from [Sheet2$] where [Sheet2$].account_number= '" + account_number + "'", oconn2);
DataTable dt = new DataTable();
db.Fill(dt);
int iRow = dt.Rows.Count;