Note that there are some explanatory texts on larger screens.

plurals
  1. POConnect MVC 3 application to sql server 2008
    primarykey
    data
    text
    <p>I am newbie and confused how to do it.</p> <p>I have built MVC 3 application in Visual Studio 2010 and published to the localhost and it's working fine.</p> <p>Here, What I actually want is to use the Sql Server 2008 installed in my computer rather than database under the folder APP_DATA that I have created using visual studio.</p> <p>I am new to the MVC and don't know about the database connection detailly. Following is the connection string of the web.config file:</p> <pre><code> &lt;connectionStrings&gt; &lt;add name="IVRControlPanelEntities" connectionString="metadata=res://*/Models.IVRControlPanelModel.csdl|res://*/Models.IVRControlPanelModel.ssdl|res://*/Models.IVRControlPanelModel.msl;provider=System.Data.SqlClient;provider connection string=&amp;quot;data source=.\SQLEXPRESS;attachdbfilename=|DataDirectory|\IVRControlPanelDB.mdf;integrated security=True;user instance=True;multipleactiveresultsets=True;App=EntityFramework&amp;quot;" providerName="System.Data.EntityClient" /&gt; &lt;/connectionStrings&gt; </code></pre> <p>This is the connectionstring automatically added by the visual studio while adding the data entity model.</p> <p>After published to localhost the database used by mvc 3 is under the APP_DATA folder of wwwroot folder.</p> <p>What I need to change to connect to the Sql Server 2008 installed in my computer rather than database created on the Visual Studio. </p> <p>One more thing, I could not import the database created by visual studio to the sql server 2008 which is in the form IVRControlPanelDB.<strong>mdf</strong></p>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload