Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Dynamically creating Access 2K table with VFP 6.0
Message
From
14/02/2001 16:13:50
 
 
To
14/02/2001 15:15:36
General information
Forum:
Visual FoxPro
Category:
Databases,Tables, Views, Indexing and SQL syntax
Miscellaneous
Thread ID:
00475987
Message ID:
00476027
Views:
31
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
Previous
Reply
Map
View

Click here to load this message in the networking platform