Can multiple SQL Express .mdf files be attached to D-ASP MS SQL 2005?

Discussion in 'Databases' started by Chicago_Lar, May 2, 2007.

Thread Status:
Threads that have been inactive for 5 years or longer are closed to further replies. Please start a new thread.
  1. Here's a newbie question, I haven't ran on to it in the forum yet:

    I have three SQL Express databases in the App_Data folder on my PC. One is aspnetdb.mdf where my security information is stored.
    </o:p>
    Can I connect more than one SQL Express database to D-ASP SQL 2005 or do I need to combine the three into a single database (aspnetdb.mdf)? What I read elsewhere cautioned against adding tables to \App_Data\aspnetdb.mdf.
    </o:p>
    If the answer is yes, do I just create three separate connection strings to access them from my application?
    </o:p>
    Thanks,

    Lar
     
  2. Bruce

    Bruce DiscountASP.NET Staff

    No.. YOU cannot attach multiple mdf to a single database.

    You have several options

    1) Merge the databases into a single database on your local environment and attached the mdf.

    2) Attach your application data to the server and then manually install the ASPNETDB. See http://kb.discountasp.net/article.aspx?id=10413

    3) Use SQL Import / Export wizard to migrate database schema / data.

    Bruce

    DiscountASP.NET
    www.DiscountASP.NET
     
  3. Bruce -- thank's a lot, I really appreciate the help.


    Lar
     
Thread Status:
Threads that have been inactive for 5 years or longer are closed to further replies. Please start a new thread.

Share This Page