SQL Express Connection String

To let ASP.NET to search the database location, use the following connection strings in the web.config in specific cases

-> in the default data folder

connectionString="Data Source=.\SQLExpress;Integrated Security=True;User Instance=True;AttachDBFilename=|DataDirectory|aspnetdb.mdf"

-> in an absolute path

connectionString="Provider=Microsoft.Jet.OLEDB.4.0;Data Source=C:\NewMembershipProvider\App_Data\Members.mdb;Persist Security Info=False"

Print | posted on Friday, July 07, 2006 3:51 PM

Comments on this post

# re: SQL Express Connection String

Requesting Gravatar...
You helped me. Thanks.
Left by Jasmin on Jun 18, 2008 1:51 AM

Your comment:

 (will show your gravatar)
 
Please add 2 and 6 and type the answer here: