Advertisement
Guest User

Untitled

a guest
Dec 24th, 2016
105
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.64 KB | None | 0 0
  1. string _MySQLConnetedString = "server=localhost;user=root;database=plast-service;password =";
  2. string _MySQLCommandString = "INSERT INTO `accounts` (id, name, password, email) VALUES ('', '123', '456', '789');";
  3. MySqlConnection _MySQLConnected = new MySqlConnection(_MySQLConnetedString);
  4. try
  5. {
  6. _MySQLConnected.Open();
  7. MySqlCommand _MySQLCommand = new MySqlCommand(_MySQLCommandString, _MySQLConnected);
  8. _MySQLConnected.Close();
  9. MessageBox.Show("Вы зарегистрировались.");
  10. }
  11. catch
  12. {
  13. MessageBox.Show("При регистрации произошла ошибка, свяжитесь с разработчиком.");
  14. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement