You are not Logged in
Would you like to Login or Register

Today is: Friday, 21 November, 2008
Check this months hot topics

SQL Server 2005 mdf file Query String

To add a SQL Server 2005 local database to one of your projects, create the connection as follows.

conn = new SqlConnection(@"server=(local)\SQLExpress; AttachDbFileName=|DataDirectory|MyDatabase.mdf; Integrated Security=false; User Instance=false");
conn.Open();
kick it on DotNetKicks.com del.icio.us digg Mister Wong YahooMyWeb Reddit Furl Spurl blogmarks
Barrington Haynes Skype
Author : Barrington Haynes
Published : Wednesday, 14 June, 2006

Barry is the coolest member of the Innovation Team - not only does he code he's also a rock star (lead vocals and guitarist in the bands BridgeFire and Best of Foo) - what a combination. Barry is extremely interested in the integration of software components and embraces a lot of the current hype around web 2.0 and related concepts as standard.

Add Comment

Enter your comment below and it will be submitted for moderation.

Your Name

Add Tag

Please enter tags for this article, seperated by semi-colon ;

View Tag's by : # articles | # views

More Publications

Programmatically resolving ~ URL's to the Virtual Root using ResolveURL()
Paul Hayman - 14/6/2006
Referencing ConfigurationManager
Barrington Haynes - 14/6/2006
SQL Server 2005 mdf file Query String
Barrington Haynes - 14/6/2006
ASP.NET Framework 1.1 Validation not working in IE7?
Paul Hayman - 4/7/2007
TraceListener creates huge log files
Lee Keable - 26/7/2006