Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Accessing a MS Access table for Visual FoxPro
Message
From
09/10/2001 03:58:15
 
 
To
09/10/2001 01:58:24
General information
Forum:
Visual FoxPro
Category:
Databases,Tables, Views, Indexing and SQL syntax
Miscellaneous
Thread ID:
00565813
Message ID:
00565825
Views:
29
Cameron,
You could also use SQL passthrough to access the data:
lcConnectionStr = "DRIVER={Microsoft Access Driver (*.mdb)};" +;
                  "Dbq=c:\temp\northwind.mdb;" +;
                  "Uid=Admin;" +;
                  "Pwd=;"
lnAccess = SQLSTRINGCONNECT(lcConnectionStr)

?SQLEXEC(lnAccess, "SELECT customerId, companyName FROM customers", "Customers")
If you want to update the Access data, you can make the SPT cursor updatable by setting the following properties:
CURSORSETPROP("Tables", ["customers"])
CURSORSETPROP("UpdateNameList", [customerid "customers"."CustomerID", companyname "customers"."CompanyName"])
CURSORSETPROP("KeyFieldList", [customerid])
CURSORSETPROP("UpdatableFieldList", [customerid,companyname])
CURSORSETPROP("SendUpdates", .t.)
HTH
>Is it possible to access a MS Access table in a Visual FoxPro system?
Daniel
Previous
Reply
Map
View

Click here to load this message in the networking platform