i want to compare oledb datareader data with a textbox data something like this cod.
i have textbox named textbox7 … the datareader have more than one mobile_no
OleDbCommand ol_com = new OleDbCommand(); OleDbDataReader reader; ol_com.CommandText = "select [mobile_no] from student_info"; reader = ol_com.ExecuteReader(); if (reader.Equals(textbox7.text)) { up_st_lbl2.Text = "error"; } else { //do something }