Connect to .dbf table

Reply

Join Date: Sep 2006
Posts: 54
Reputation: royaloba is an unknown quantity at this point 
Solved Threads: 1
royaloba royaloba is offline Offline
Junior Poster in Training

Connect to .dbf table

 
0
  #1
Jan 17th, 2007
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..
Reply With Quote Quick reply to this message  
Reply

This thread is more than three months old.
Perhaps start a new thread instead?
Message:



Similar Threads
Other Threads in the Visual Basic 4 / 5 / 6 Forum
Thread Tools Search this Thread



About Us | Contact Us | Advertise | DaniWeb | Acceptable Use Policy | RSS Feed

©2003 - 2009 DaniWeb® LLC