Hot to Attach a Database on Winhost

Discussion in 'Databases' started by 0000765, Sep 21, 2010.

  1. Hi, i have created a SQL Server 2008 DB; i have renamed the Db how it is declared in the control pannel, i have loaded into the App_Data folder of my site the db.mdf, i have changed the connection string inside the web.config but i do not have understand how i can attach the db to my application.

    Please help me to do it... I have readed about a tool to charge the .mdf file but it is avaible only to ultimate and not for the other account.

    Thank's to all, Marco
     
  2. Ray

    Ray

    Getting your web application to look at a SQL 2008 server is dictated by how you code the connection string. Did you look at your connection string and made sure it is looking at our SQL 2008 Server?

    Try looking at this link for examples on how a connection string looks like.

    http://www.connectionstrings.com/
     
  3. Hi there

    does one have to publish the database to your server or is it sufficient to copy over the app data folder and modify the connection string?
     
  4. Ray

    Ray

    No, you need to publish the database to the SQL server. You cannot connecting to the database through the MDF file.
     
  5. i have the same problem.
    i have changed the connection string to connect the server databse. But, i having problem to upload my local database to the server.
    Is it must be done with sql server 2008 or sql server 2005? Can i get another software to do it? (can be done with visual studio 2010?)
    can i get any help on how to upload my local databse to the server?
     
  6. Ray

    Ray

    Last edited by a moderator: Oct 14, 2015

Share This Page