Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Import Access
Message
From
14/06/2006 06:02:49
 
General information
Forum:
Visual FoxPro
Category:
Databases,Tables, Views, Indexing and SQL syntax
Title:
Environment versions
Visual FoxPro:
VFP 8
Database:
Visual FoxPro
Miscellaneous
Thread ID:
01128911
Message ID:
01128919
Views:
20
hi,
i try to use your code as under i get error message, what is rong,
i have accesss.mdb at drive d:\ as
order\order.mdb and d:\fadi\121.mdb....etc
lcOBDCh = SQLSTRINGCONNECT([Driver={Microsoft Access Driver (*.mdb)};Dbq=d:\order\order.mdb;Uid=USERNAME;Pwd=PASSWORD;])
thanks

>>Hi all,
>>
>>I need to import the contents of an Access table into an existing FoxPro table. What is the best way to do this? I'm new to FoxPro so don't know much about setting up ODBC links - are there any good examples out there?
>>
>>Thanks
>
>An example how to connect to Access DB and get data from one of its tables:
>
>lcOBDCh = SQLSTRINGCONNECT([Driver={Microsoft Access Driver (*.mdb)};Dbq=FULL PATH TO ACCESS DATABASE HERE;Uid=USERNAME;Pwd=PASSWORD;])
>IF lcOBDCh < 1
>   AERROR(laError)
>   MessageBox([Cannot connect to AccessDB ]+laError[1,2])
>   RETURN .f.
>ENDIF
>IF SQLEXEC(lcOBDCh, [SELECT * FROM MyAccessTable],[VFPCursor]) < 1
>   AERROR(laError)
>   MessageBox([Cannot get data from MyAccessTable ]+laError[1,2])
>   SQLDISCONNECT(lcOBDCh)
>   RETURN .f.
>ENDIF
>SELECT VFPCursor
>GO TOP
>BROWSE NORMAL
>
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform