Vb.net with Mysql
I've been trying to make my own login/registration system in vb.net, with not too much luck. I got most of my information from www.vbmysql.com, but still haven't been able to complete the login form. I'm trying to connect to the database, users, and the table user. Right now, I'm just trying to retrive the username data and compare it. I'm hopelessly lost now, and on the verge of giving up. Please help me!
Below is a small piece of my code.
I've been trying to make my own login/registration system in vb.net, with not too much luck. I got most of my information from www.vbmysql.com, but still haven't been able to complete the login form. I'm trying to connect to the database, users, and the table user. Right now, I'm just trying to retrive the username data and compare it. I'm hopelessly lost now, and on the verge of giving up. Please help me!
Below is a small piece of my code.
Code:
If user.Text = "" Then
MsgBox("Enter a Username!")
Else
If pass.Text = "" Then
MsgBox("Enter a Password!")
Else
conn = New MySqlConnection()
conn.ConnectionString = "server=localhost; user id=root; password=; database=users"
End If
Try
conn.Open()
sSQL = "SELECT * FROM user where user= '" & user.Text & "'"
conn.Close()
If sSQL = user.Text Then
MsgBox("Success!")
work = 1
End If
Catch myerror As MySqlException
*** Rest of the code ***