There is already an open DataReader associated with this Connection which must be closed first.<br />
string MyConString = ConfigurationManager.ConnectionStrings["College_Management_System.Properties.Settings.cmsConnectionString"].ConnectionString; MySqlConnection connection = new MySqlConnection(MyConString); MySqlCommand command = connection.CreateCommand(); MySqlDataReader Reader; command.CommandText = "select name from course_master"; connection.Open(); Reader = command.ExecuteReader(); while (Reader.Read()) { cmbo_course.Items.Add(Reader[0].ToString()); } command.CommandText = "select name from country_master"; Reader = command.ExecuteReader(); while (Reader.Read()) { cmbo_perCountry.Items.Add(Reader[0].ToString()); cmbo_country.Items.Add(Reader[0].ToString()); } connection.Close();
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)