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();
}
Loading

Iftikar HussainPosted Jul 31, 2013, 7:01 AM
Try like this
Regards,
Iftikar
honar abubakrPosted Jul 31, 2013, 7:03 AM
my problem is solved thank you for your answer