Saturday, August 20, 2011

connect to local MSSQL database

I think one makes a connection to a local MSSQL database like so:

<add name="ApplicationServices" connectionString="data source=.\SQLEXPRESS;Integrated Security=SSPI;AttachDBFilename=|DataDirectory|test.mdf;User Instance=true" providerName="System.Data.SqlClient" />

 
 

Note the reference directly to an .mdf above. http://www.microsoft.com/express/Database/ is a place to go get the means to run MSSQL locally, I think.

No comments:

Post a Comment