I have a table with value bit type data include two value 0 and 1, i want to read into checkbox, I have code below but, if 0 or 1 it alway chose and put on checkbox. How to read it to checkbox? please help. Thank you very much.
SqlCommand cmd1 = new SqlCommand("Select Purchasing From ERPManualGuide", con);
SqlDataReader reader1 = cmd1.ExecuteReader();
CheckBox5.Checked = reader1.Read();
Aucun commentaire:
Enregistrer un commentaire