hi guys..

i always got this error in vb6..
here's my code

'########### Variable declaration ###########
Dim conn As ADODB.Connection
Dim rs As ADODB.Recordset

'########### Variable initialization ###########
Set conn = New ADODB.Connection
Set rs = New ADODB.Recordset

strUserName = txtUserName.Text
strPassWord = txtPassWord.Text

connStringSQL = "MySQL ODBC 5.1 Driver; SERVER=localhost; DATABASE=cpalms; UID=root; PWD=; DSN=CPALMS;"conn.CursorLocation = adUseClient
conn.Open connStringSQL

strSQL = "SELECT * FROM userData WHERE username = '" & strUserName & "'"
    rs.Open strSQL, conn, adOpenDynamic, adLockOptimistic
        
   '########### Check if record exists ###########
    If rs.RecordCount = 0 Then                  ' the error displays in here..
        MsgBox "Username " & strUserName & " does not exist!", vbCritical + vbOKOnly
        txtUserName.SetFocus
        Call Form_Load

i would really appreciate if you could help me regarding this..
this code works fine with my computer at home, but in the office it does not..
i installed mysql 5 and vb6..the services are running smoothly..

thank you very much ^^

This question has already been answered. Start a new discussion instead.