Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Excel VBA to access the FoxPro free table thought out by
Message
 
To
05/01/2001 02:52:30
General information
Forum:
Visual Basic
Category:
Database DAO/RDO/ODBC/ADO
Miscellaneous
Thread ID:
00459683
Message ID:
00459733
Views:
13
>VBA CODE
>--------------------------------------------------------------------------------
>
>Public conn As New ADODB.connection
>Set conn = New ADODB.connection
>
>conn.Open "Driver={Microsoft Visual FoxPro Driver};SourceType=DBF;SourceDB=F:\backup;Exclusive=no;"
>
>Set rsttemp = conn.OpenSchema("SELECT expichdf.*, expictxf.* FROM expichdf INNER JOIN expictxf ON expichdf.oh_no = expictxf.od_no WHERE oh_no='" & txtQuotationNumber.text & "'", adOpenDynamic)
>
>--------------------------------------------------------------------------------
>
>
>what's wrong at the Set rsttemp = conn.OpenSchema("SELECT expichdf.*, expictxf.* FROM expichdf INNER JOIN expictxf ON expichdf.oh_no = expictxf.od_no WHERE oh_no='" & txtQuotationNumber.text & "'", adOpenDynamic)
>this line the VBA return "DATA TYPE MISMATCH"
>
>PLEASE HELP ME !
>^_^

You use the OpenSchema method.

You need to use something like this to open a recordset:
rsttemp.open "SELECT expichdf.*, expictxf.* FROM expichdf INNER JOIN expictxf ON expichdf.oh_no = expictxf.od_no WHERE oh_no='" & txtQuotationNumber.text & "'", conn
Éric Moreau, MCPD, Visual Developer - Visual Basic MVP
Conseiller Principal / Senior Consultant
Moer inc.
http://www.emoreau.com
Previous
Reply
Map
View

Click here to load this message in the networking platform