Here's my problem: I have an excel file which i run on a certain row. I am trying to compare the datarow value with a string value. if it equals, i want to add the value of a close cell to access table.
I know only how to copy paste.
private void button1_Click(object sender, EventArgs e)
{
database11DataSet.tblContacts.NewRow();
foreach (DataRow r in dsContacts.Tables[0].Rows)
{
string a = "123";
DataRow dr = database11DataSet.tblContacts.NewRow();
if (dr[0] == a) ///How to compare??
{
///////
}
//// I want to write the value of a close cell to the access database.
database11DataSet.tblContacts.Rows.Add(dr);
}
tblContactsTableAdapter.Update(database11DataSet);
}
Im sorry if i am not clear. I can explain again if needed. thanks for help.