can anyone tell me what had went wrong ? my database not working thank you =)


VB Code:
  1. Dim SQL2 As String
  2.         Dim strLine As String, strFullPath As String
  3.     Dim ff As Integer, iCount As Integer
  4. Dim conn2 As ADODB.Connection
  5. Set conn2 = New ADODB.Connection
  6. Dim rs2 As ADODB.Recordset
  7. Set rs2 = New ADODB.Recordset
  8. conn2.Open "DRIVER={MySQL ODBC 3.51 Driver};" & _
  9.            "Server=localhost;" & _
  10.            "Port=3306;" & _
  11.            "Option=131072;" & _
  12.            "Stmt=;" & _
  13.            "Database=rach2;" & _
  14.            "Uid=eugene;" & _
  15.            "Pwd=rant;"
  16.  
  17.     ff = FreeFile
  18.     x = 0
  19.    
  20.         Open myfile For Input As #ff
  21.         txtHaha.Text = vbNullString
  22.         Do While Not EOF(ff)
  23.             Line Input #ff, strLine
  24.             strLine = "1310" + strLine
  25.             'inside my txt files will have numbers 131094567485 etc
  26.         SQL2 = "SELECT callerId, callDate, callTime FROM call_dc WHERE DATE_SUB(CURDATE(),INTERVAL 3 DAY) <= callDate AND callerId = " + strLine
  27.         rs2.CursorLocation = adUseClient
  28.         rs2.Open SQL2, conn2, adOpenForwardOnly, adLockReadOnly
  29.                 Do While Not rs2.EOF
  30.                      'if database number = txt number then it will list out in the text box where txtHaha is
  31.                     If rs2.Fields("callerId") = strLine Then
  32.                         txtHaha.Text = strLine
  33.                         x = x + 1
  34.                     End If
  35.                     rs2.MoveNext
  36.                 Loop
  37.         Loop
  38.     Close #ff
  39.     MsgBox x
  40.     MsgBox ("Section Complete Please Open Another File")