Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 Other Forums
 MS Access
 Output Table Definition to Text File

Author  Topic 

Apollois
Starting Member

49 Posts

Posted - 2003-02-24 : 22:30:18
Is there an Access equivalent to the SQL Server "Generate SQL Script" task? This is for Access 2000 and later.

I need to create a text file (or text output to window) that contains the code to recreate an Access table. The user should be able to select the table (or all tables) from the Access DB.

Of course, then I need a way to "execute" this script to recreate the table(s) from the text file.

If it's not possible to create an SQL script to recreate the table, then it would still be helpful to output a text file with the table definition, something like:

Table Customers
================
Cust_ID autonumber primary key
LName Text(30)
FName Text(20)
Age Integer
BirthDate Date/Time

Thanks,
apollois

uberman
Posting Yak Master

159 Posts

Posted - 2003-02-25 : 04:02:57
Not had to do this myself but have you looked at the hidden and system tables in Access?

Tools/Options.../View

Check the Hidden Objects and System Objects

You will then see the tables that hold all the definitions of the objects in the mdb.

If you know what you are looking for (table name, field names, definitions etc.) you should be able to work out the query needed to return the information you require

Hope this helps

Go to Top of Page
   

- Advertisement -