Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Dynamically creating Access 2K table with VFP 6.0
Message
De
14/02/2001 16:13:50
 
 
À
14/02/2001 15:15:36
Information générale
Forum:
Visual FoxPro
Catégorie:
Base de données, Tables, Vues, Index et syntaxe SQL
Divers
Thread ID:
00475987
Message ID:
00476027
Vues:
28
Steve,

There are different ways to do this. The following code uses SQL-passthrough:
*-- build connection string
lcConnectionStr = "DRIVER={Microsoft Access Driver (*.mdb)};" +;
                  "Dbq=c:\temp\test.mdb;" +;
                  "Uid=Admin;" +;
                  "Pwd=;"

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

*-- create the table
*-- Note that we need to use Access SQL dialect (char(12) vs. C(12))
SQLEXEC(lnAccess, "CREATE TABLE test (Field1 char(12), Field2 char(12))")
>Hi. To make a long story short, I need to create Access 2000 tables and insert them into a .mdb database with VFP 6.0. Template tables reside in this database that I can utilize. For example, when the first record is entered for March, 2001 it will create the table [3-2001-info] from the template table [general_info]. I have disovered how to insert data into an Access database, but I can't find how to create one. If anyone has any ideas, please let me know.
>
>Thanks in advance,
>Steve
Daniel
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform