By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
435,492 Members | 3,174 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 435,492 IT Pros & Developers. It's quick & easy.

exporting database table create statements

P: n/a
jan
Hello,
I am new to this list and would appreciate some help with Access 2000
and Access 2003. I need to export our access database table statements
by access database to place into our database model repository. We have
several different relational databases, of which access is one, so we
want to keep all of the SQL that creates tables in a single model
repository. Is there some way within the access tool to export this
information? I tried the documentor, but it puts out a report, not the
create statements.
Thanks,
Jan

Nov 13 '05 #1
Share this Question
Share on Google+
1 Reply


P: n/a
I don't believe there is a tool that does this for you.

It would possible to loop through the Fields of each TableDef, examining the
Name, Type, Size, Attributes, etc of each one, and programmatically generate
a SQL statement to reproduce the table. You would then need to loop through
the table's Indexes collection, and also the Relations collection of the
database. For a sample of looping through a table, see:
http://members.iinet.net.au/~allenbrowne/func-06.html

However, you need to remember that Access is different to other database
products. Most databases are just engines, whereas Access is also a data
entry interface and reporting tool, fully integrated with data-specific
events and a complete programming language. As a result, the tables and
fields contain properties that cannot be assign with SQL statements, e.g.
DisplayControl which can only be set with DAO code.

Ultimately that means it is not possible to recreate an Access data
structure using just SQL statements.

--
Allen Browne - Microsoft MVP. Perth, Western Australia.
Tips for Access users - http://allenbrowne.com/tips.html
Reply to group, rather than allenbrowne at mvps dot org.

"jan" <jr***@mutualprotective.com> wrote in message
news:11*********************@c13g2000cwb.googlegro ups.com...
Hello,
I am new to this list and would appreciate some help with Access 2000
and Access 2003. I need to export our access database table statements
by access database to place into our database model repository. We have
several different relational databases, of which access is one, so we
want to keep all of the SQL that creates tables in a single model
repository. Is there some way within the access tool to export this
information? I tried the documentor, but it puts out a report, not the
create statements.
Thanks,
Jan

Nov 13 '05 #2

This discussion thread is closed

Replies have been disabled for this discussion.