1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

Allow User To Create NEW Access Database

Discussion in 'C#' started by Toulinwoek, Aug 30, 2010.

  1. Toulinwoek

    Toulinwoek New Member

    Aug 30, 2010
    Likes Received:
    Trophy Points:
    I have created an Access (2010, but converted to 2007) database and I am building a front end to it using C#. I can't figure out how to provide the user with the means to create a new instance of that database. The idea is that the user can create multiple databases.
    Generally, if I can figure out the concept I can figure out the code to write, but in this case I might need help with the code! Here's what I'm thinking, so if someone can, tell me if this is too klunkity!

    When the program is installed, a hidden folder will be created, into which an empty copy of the database will be placed. When the user requests to create a new database, a dialog permits to specify a name and location, and then a copy of the empty database is created with the name, and in the location specified by the user, and a connection string is modified accordingly.

    I have a feeling there is a more elegant (efficient) way of doing this, but I can't figure out what it is! It also seems I would have to somehow store multiple connection strings if the user is to be able to open any of the previously created databases.

Share This Page