Guest User

Untitled

a guest
May 15th, 2018
99
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.49 KB | None | 0 0
  1. private void button2_Click(object sender, EventArgs e)
  2. {
  3. label8.Text = textBox2.Text;
  4. label8.Visible = true;
  5. MySqlConnection connection = new MySqlConnection("datasource=localhost;port=3306;username=root;password=root");
  6. MySqlCommand command = new MySqlCommand("CREATE TABLE " + label8.Text + "(Team Name VARCHAR(20) NOT NULL, Wins INT(2) NULL, Place INT(2) NULL AUTOINCREMENT", connection);
  7. connection.Open();
  8. command.ExecuteNonQuery();
  9. textBox3.Enabled = true;
  10. connection.Close();
  11. }
Add Comment
Please, Sign In to add comment