Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Accessing a MS Access table for Visual FoxPro
Message
De
09/10/2001 03:58:15
 
 
À
09/10/2001 01:58:24
Information générale
Forum:
Visual FoxPro
Catégorie:
Base de données, Tables, Vues, Index et syntaxe SQL
Divers
Thread ID:
00565813
Message ID:
00565825
Vues:
33
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
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform