Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations bkrike on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Code to generate/regenerate a DB

Status
Not open for further replies.

Chalco

Programmer
Jul 17, 2003
32
GB
Hi,
I normally work on Oracle, so I understand it's internal dictionary, however, I would like some guidence (or code !!) which when run against an access database will produce the sql that could recreate the database, including all R.I., indexes, default values etc

Reasons are two fold -

1. As I said, I am more of an Oracle person, so I always tend to work at the SQL Level for creating / amending structure, and I find the help system very frustrating to tell me how to achieve what I want, so invariabely switch to the GUI to do it (therefore not learning)

2.If I want to upgrade the backend database on a differnent PC, I do not want to have to do it manually - I would prefer to have some SQL/function/procedure that I can run on startup of the new Frontend

Chalco
 
I don't think there is any easy method. I have used the database documenter utility to create a table of objects and property values. From this, I wrote code that looped through a recordset created from the table and created tables, indexes, forms, ... This was a lot of work.

You can use DAO or ADOX code to create new tables, fields, and indexes in an MDB.

Duane
MS Access MVP
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top