Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- public void SubmitData()
- {
- string connectionString =
- "Server=localhost;" +
- "Database=test;" +
- "User ID=myuserid;" +
- "Password=mypassword;" +
- "Pooling=false";
- MySqlConnection dbcon = new MySqlConnection(connectionString);
- dbcon.Open();
- MySqlCommand dbcmd = dbcon.CreateCommand();
- dbcmd.CommandText = "INSERT INTO table VALUES ('qwerty','asdfgh')";
- dbcmd.ExecuteNonQuery();
- MySqlDataReader reader = dbcmd.ExecuteReader();
- dbcmd.Dispose();
- dbcon.Close();
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement