when i want to bind a combobo with a table column give me error like error in the image in this link http://s23.postimg.org/btzj2n66j/Capture.png
this is my code
private void bindcombo ()
{
OleDbCommand com = new OleDbCommand();
OleDbDataReader reader;
com.Connection = db_con;
db_con.Open();
com.CommandText = "select * from colleges";
reader = com.ExecuteReader();
while(reader.Read())
{
string combo_items = reader.GetString("college_name");
college_name.Items.Add(combo_items);//college_name is a combobox
}
db_con.Close();
}
Error in binding combobox?
2 Answers
Know the answer? Post it. Somebody with the same question will find it here.


Iftikar HussainRank #423 · 5.9K reputationPosted Jul 31, 2013, 3:01 AM EDT
Try like this
Regards,
Iftikar
honar abubakr62 reputationPosted Jul 31, 2013, 3:03 AM EDT
my problem is solved thank you for your answer