Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
- Dim conn As New MySqlConnection
- conn.ConnectionString = ("server=wish-pc;userid=root;password=root;Initial Catalog=SSdatabase;Integrated Security=True")
- Dim cmd As New MySqlCommand
- Dim dr As MySqlDataReader
- conn.Open()
- cmd.Connection = conn
- cmd.CommandText = ("select * from stable where username='" & TextBox1.Text & "'and password='" & TextBox2.Text & "'")
- dr = cmd.ExecuteReader
- If dr.HasRows Then
- Me.Hide()
- Form2.Show()
- Else
- MessageBox.Show("username and password are not correct")
- End If
- End Sub
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement