Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- public void FillCmbStage()
- {
- string queryString = "SELECT * FROM organizer.stages";
- using (SqlConnection connection = new SqlConnection("datasource=localhost;port = 3306;username=root;password=1234;"))
- {
- SqlCommand command = new SqlCommand(queryString, connection);
- connection.Open();
- command.CommandTimeout = 0;
- SqlDataReader reader = command.ExecuteReader();
- comboBox3.Items.Clear();
- while (reader.Read())
- {
- comboBox3.Items.Add(reader[0].ToString());
- }
- reader.Close();
- }
- }
Add Comment
Please, Sign In to add comment