Results 1 to 7 of 7
  1. #1
    accesscoder is offline Novice
    Windows Vista Access 2007
    Join Date
    Sep 2010
    Posts
    19

    Creating tables from scripts


    Hello everybody,

    I have created database containing, 4-5 tables, some are static, some are dynamic. During the testing of application I entered a lot of data in it. Now I want to deploy the application to client. Is there any way, using which I can create a script of all the tables and execute it on client machine? Basically my goal is to deploy the database at client's Access, with primary keys(auto number) of the table starting from 1. It will be very difficult to create the tables again.

    I appreciate your help!
    Thank you!

  2. #2
    pbaldy's Avatar
    pbaldy is offline Who is John Galt?
    Windows XP Access 2007
    Join Date
    Feb 2010
    Location
    Nevada, USA
    Posts
    22,521
    To my knowledge, Access does not have a feature to script the CREATE TABLE statements like say SQL Server does. That said, it should be a relatively simple matter to make a copy of the db, and delete all the data from the tables. If you then compact/repair, the autonumbers should reset.
    Paul (wino moderator)
    MS Access MVP 2007-2019
    www.BaldyWeb.com

  3. #3
    accesscoder is offline Novice
    Windows Vista Access 2007
    Join Date
    Sep 2010
    Posts
    19
    Wow..thats what I wanted!
    Thank you, pbaldy!

  4. #4
    pbaldy's Avatar
    pbaldy is offline Who is John Galt?
    Windows XP Access 2007
    Join Date
    Feb 2010
    Location
    Nevada, USA
    Posts
    22,521
    No problemo!
    Paul (wino moderator)
    MS Access MVP 2007-2019
    www.BaldyWeb.com

  5. #5
    ajetrumpet is offline VIP
    Windows Vista Access 2007
    Join Date
    Mar 2010
    Location
    N/A
    Posts
    2,694
    Quote Originally Posted by pbaldy View Post
    To my knowledge, Access does not have a feature to script the CREATE TABLE statements like say SQL Server does.
    Paul, i believe the DD queries can execute command like in Sql server and PHP/mysql. I've never run one, but I was reading up on it the other day. The statements look pretty much the same as server side querying does. ever used one?

    the article I was reading used commands like 'alter table' and 'drop'

  6. #6
    pbaldy's Avatar
    pbaldy is offline Who is John Galt?
    Windows XP Access 2007
    Join Date
    Feb 2010
    Location
    Nevada, USA
    Posts
    22,521
    I'm certainly aware that Access can run DDL queries. I think the question revolved around whether you could have Access create the DDL SQL for you, which I'm not aware of it being able to. In SQL Server, you can simply right-click on a table and have the DDL query created for you that would enable you to recreate the same table elsewhere.
    Paul (wino moderator)
    MS Access MVP 2007-2019
    www.BaldyWeb.com

  7. #7
    ajetrumpet is offline VIP
    Windows Vista Access 2007
    Join Date
    Mar 2010
    Location
    N/A
    Posts
    2,694
    i just wondered Paul. I've never used them, but I will experiment whenever I have time. Interested in what they offer...

Please reply to this thread with any new information or opinions.

Similar Threads

  1. Replies: 1
    Last Post: 07-27-2010, 08:02 AM
  2. linking tables to other tables
    By detlion1643 in forum Access
    Replies: 1
    Last Post: 01-25-2010, 12:33 PM
  3. Database scripts
    By dvongrad in forum Access
    Replies: 1
    Last Post: 12-02-2009, 09:28 AM
  4. Creating Form from Normalized Tables
    By heathers in forum Forms
    Replies: 2
    Last Post: 09-10-2009, 03:43 AM
  5. Joining tables two tables and another table that is not
    By DevintheDude in forum Database Design
    Replies: 0
    Last Post: 09-12-2007, 08:56 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Other Forums: Microsoft Office Forums