Running Access 2K3 and moving a database to MSDE. All I need to do is get the CREATE TABLE statement out of Access for a table. I don't want to transfer the data, just the structure.
Can someone help a gimp out? :(
Printable View
Running Access 2K3 and moving a database to MSDE. All I need to do is get the CREATE TABLE statement out of Access for a table. I don't want to transfer the data, just the structure.
Can someone help a gimp out? :(
Have you tried using the Upsizing Wizard?
Tools-->>Database Utilities-->>Upsizing Wizard
It will generate the new DB for you.
I already have the database created. But there was a table that I missed when I ran the DTS. I just want the CREATE TABLE SQL from Access for that table. And if nothing else, just for my own knowledge in the future.
I just didn't think it was going to be this hard.
As far as I'm aware ther eis no other way to generate a CREATE TABLE statement from Access, sorry. It really is a crap DB.
Speakin to the choir, friend, speakin to the choir ;)
There is, but in VB6 (or some other language). It may be translatable to Access vba. It probably wouldn't work in vba, but that's not needed here.
Traverse the table (using ADOX or, possibly, the schema), looking for the elements, and generate the appropriate SQL statement to create each one. There's a program on PSC that reads an Access MDB and creates VB6 code, so you can ship your program without having to ship a blank .mdb file with it. (Since I'm 400 miles from home, and on my wife's laptop, I have no reference to it.)
Perhaps this is what Al42 is talking about?
Actually it was this one. (Since I had to look at PSCode to see if you got the one I was thinking of, I did a quick search.)
You can just generate a report on the schema from within Access.
Tools > Analyze > Documentor. Then you can select whatever db object(s) you want a schema report on and then output that report to Excel or Word.