SHARE
TWEET

Untitled

a guest May 23rd, 2019 69 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1.  conexion.Open();
  2.             OleDbCommand command = new OleDbCommand();
  3.             command.Connection = conexion;
  4.             command.CommandText = "select * from tabla where columnaUsuario='" + usuario.Text + "'and contrasena='" + contrasena.Text + "'";
  5.             OleDbDataReader reader = command.ExecuteReader();
  6.             int count = 0;
  7.             while (reader.Read())
  8.             {
  9.                 count++;
  10.             }
  11.             if (count == 1)
  12.             {
  13.                 MessageBox.Show("Guillermo genio ");
  14.                 conexion.Close();
  15.                 this.Hide();
  16.                     Form1 form = new Form1();
  17.                     form.ShowDialog();
  18.             }
  19.            
  20.             else
  21.             {
  22.                 MessageBox.Show("Guillermo genio te equivocaste, intenta de nuevo");
  23.             }
  24.             conexion.Close();
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
Not a member of Pastebin yet?
Sign Up, it unlocks many cool features!
 
Top