i am trying to log a user in using a login form. i have my connection to my database and there and it connects just fine but it will only read the first row. here is my code.
Code:
        Dim ConnString As String = "Driver={MySQL ODBC 3.51 Driver};Server=dansoft.selfip.com;Option=131072;Stmt=;Database=elemental_battle; User=****;Password=*****;"
        Dim objConn As New OdbcConnection(ConnString)

        objConn.Open()
        Dim dt As New DataTable
        Dim sqlComm As New OdbcCommand("SELECT username,password from userinfo", objConn)
        Dim dr As OdbcDataReader = sqlComm.ExecuteReader
        dr.Read()
   
        Dim user As String = CStr(dr("username"))
        Dim pass As String = CStr(dr("password"))

        If user = UsernameTextBox.Text And pass = PasswordTextBox.Text Then
            frmMain.Show()
            Me.Close()
        Else
            MessageBox.Show("Invalid Username or password, Please try again")
        End If
        objConn.Close()
there are two entries in the database. the first username and password are bagstoper and 1a2b3c4 the second is bagstoper2 and 1a2b3c4d. when i test it with the first username and password it works but when i try the second it doesnt work. so any help would be great. thank you.