Hi all
when i execute my code it gives me this error " no data exists for the row column"
can anyone please help me,,,am using access database
here is my code:
private void UpdateStudent_Load(object sender, EventArgs e)
{
OleDbDataAdapter da = new OleDbDataAdapter();
da.SelectCommand = new OleDbCommand("select * from Students where SID= " + U_ID, con);
con.Open();
OleDbDataReader rd = da.SelectCommand.ExecuteReader();
if (rd.Read())
{
//txtId.Text = U_ID;
txtId.Text = rd["SID"].ToString();
}
rd.Close();
}