Login Program

Joaogl

New member
Joined
May 29, 2012
Messages
2
Programming Experience
1-3
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:

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


 
Back
Top