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();
| 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.