954,558 Members — Technology Publication meets Social Media
Username:
Password:
Lost login information?
Have something to say? Contribute New Article Reply to this Article

Connect to .dbf table

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...

Dim conn As ADODB.Connection
        Dim squery As String
        Dim rs As ADODB.Recordset
        Set conn = New ADODB.Connection
        conn.Open "Driver={Microsoft Visual FoxPRO Driver};SourceDB=" & App.path & ";SourceType=DBF"
       
        squery = "Select * from employee where Card_no=" & Format(Enrollnumber, "00000") & ""
        Set rs = New ADODB.Recordset
        rs.Open squery, conn
        
        Text1.Text = rs!Fname



thanks..

royaloba
Junior Poster in Training
54 posts since Sep 2006
Reputation Points: 13
Solved Threads: 1
 

This article has been dead for over three months

Post: Markdown Syntax: Formatting Help
You