Guest User

Untitled

a guest
May 19th, 2018
139
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.46 KB | None | 0 0
  1. MySqlConnection DBConnection = new MySqlConnection(ConnectionString);
  2. DBConnection.Open();
  3. String SignInCMD = "select * from [table] where binary Username='"+usernameTextBox.Text+"' and binary Password='"+passwordTextBox.Text+"'"
  4. MySqlCommand SignInQuery = new MySqlCommend(SignInCMD, DBConnection);
  5. MySqlDataReader dr = SignInQuery.ExecuteReader();
  6.  
  7. if(dr.Read())
  8. {
  9. MessageBox.Show(dr.GetString(1));
  10. }
  11. else
  12. MessageBox.Show("Information is not valid!");
Add Comment
Please, Sign In to add comment