Using sqlexpress mdf for testing

Discussion in 'ASP.NET 2.0' started by nalenb, Oct 12, 2007.

  1. I have a main site hosted here. To allow for testing new features, etc. I have setup a folder as a web application via the control panel. That seems to be working fine. But now I want to use another database rather than the production one for this testing site. I could use the existing database with a table prefix but that would mean writing a bunch of code I'd rather avoid. I've uploaded my mdf file from vs.net 2005 (the one that is created by vs.net 2005 using sqlexpress), but that doesn't seem to work. Is there a way to use an mdf file from a site here? I read something about attaching it to my sql 2005 database, but I'm not sure how to do that or how to use it, i.e. what connection string info would I give it.

    Thanks
     
  2. You can attach you mdf to your remote MS SQL database using the SQL tool suite in the control panel[Control Panel >Database Management>MS SQL 2005>SQL Tool Suite] .But remember, attaching a new mdf to your existing database would overwrite your existing database in there.

    As far as the connection string is concerned, it will be referring to your remote database where you attached the file. Connection string information can be found at the MS SQL 2005 page within the control panel.</o:p>

    Vikram

    DiscountASP.NET
    www.DiscountASP.NET
     

Share This Page