Hello,
Please some one can teach me how to create a login form?
I have the all the connection to the database but i cant do the check user and password...
there is my code:
Please some one can teach me how to create a login form?
I have the all the connection to the database but i cant do the check user and password...
there is my code:
Imports MySql.Data
Imports MySql.Data.MySqlClient
Public Class Form1
Dim dbCon As MySqlConnection
Dim strQuery As String = ""
Dim SQLCmd As MySqlCommand
Dim DR As MySqlDataReader
Private Sub GetDBData()
Try
' PREPARE CONNECTION AND QUERY
dbCon = New MySqlConnection("Server=;Port=;Database=;Uid=;Pwd=")
strQuery = "SELECT account.id, account.fname, account.lname FROM account"
SQLCmd = New MySqlCommand(strQuery, dbCon)
' OPEN THE DB AND KICKOFF THE QUERY
dbCon.Open()
DR = SQLCmd.ExecuteReader
' DONE! CLOSE THE DB
DR.Close()
dbCon.Close()
Catch ex As Exception
MsgBox("FAILURE TO COMMUNICATE!" & vbCrLf & vbCrLf & ex.Message)
End Try
End Sub
End Class