943,987 Members | Top Members by Rank

Ad:
Jan 17th, 2007
0

Connect to .dbf table

Expand Post »
Hello guys,
im trying to connect to .dbf table every time i try to query from the table it gives a error
[Microsoft][ODBC Visual FoxPro]Operator/operand type ,mismatch

heres my sample code...
Visual Basic 4 / 5 / 6 Syntax (Toggle Plain Text)
  1. Dim conn As ADODB.Connection
  2. Dim squery As String
  3. Dim rs As ADODB.Recordset
  4. Set conn = New ADODB.Connection
  5. conn.Open "Driver={Microsoft Visual FoxPRO Driver};SourceDB=" & App.path & ";SourceType=DBF"
  6.  
  7. squery = "Select * from employee where Card_no=" & Format(Enrollnumber, "00000") & ""
  8. Set rs = New ADODB.Recordset
  9. rs.Open squery, conn
  10.  
  11. Text1.Text = rs!Fname
thanks..
Similar Threads
Reputation Points: 13
Solved Threads: 1
Junior Poster in Training
royaloba is offline Offline
54 posts
since Sep 2006

This thread is more than three months old

No one has posted to this discussion for at least three months. Please let old threads die and do not reply to them unless you feel you have something new and valuable to contribute that absolutely must be added to make the discussion complete. Otherwise, please start a new thread in this forum instead.
Message:
Previous Thread in Visual Basic 4 / 5 / 6 Forum Timeline: Controlling simple devices in VB4/VB5
Next Thread in Visual Basic 4 / 5 / 6 Forum Timeline: VB6 & Access (user name, network printer, reminders)





About Us | Contact Us | Advertise | Acceptable Use Policy
Forum Index | Build Custom RSS Feed


Follow us on Twitter


© 2011 DaniWeb® LLC