Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
VFP.dbf to Access.mdb
Message
De
02/01/2002 17:12:15
 
 
À
02/01/2002 15:41:33
Information générale
Forum:
Visual FoxPro
Catégorie:
COM/DCOM et OLE Automation
Divers
Thread ID:
00599945
Message ID:
00599985
Vues:
33
This message has been marked as a message which has helped to the initial question of the thread.
Paige,
Happy New Year!

You could also use SQL passthrough:
*-- build connection string
lcConnectionStr = "DRIVER={Microsoft Access Driver (*.mdb)};" +;
                  "Dbq=c:\temp\northwind.mdb;" +;
                  "Uid=Admin;" +;
                  "Pwd=;"

*-- connect to Access database
lnAccess = SQLSTRINGCONNECT(lcConnectionStr)

*-- add a record to the customers table
?SQLEXEC(lnAccess, "INSERT INTO customers (customerId, companyName) VALUES('X0001', 'Customer added through VFP')")

*-- or using memvars:
m.customerId = "X0002"
m.companyName = "Another Customer added through VFP"
?SQLEXEC(lnAccess, "INSERT INTO customers (customerId, companyName) VALUES('" + m.customerId +"', '" + m.companyname + "')")
HTH
>Happy New Year All,
>
>I'm trying to create a record in an MS Access table, from VFP 6/7 and populate it with data from VFP variables. This will probably require some VBA code. I have Della Martin's book on MS Office Automation w/ VFP (which I've used extensively) but it doesn't mention MS Access. It's been a while since I've accessed the UT knowledge base and I'm not sure how to do it with our new interface. Any suggestions will be appreciated. TIA.
>
>Regards,
>
>Paige
Daniel
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform