Home ASP.NET 2.0 Resolving Visual Web Developer 2005 Express and SQL Express 2005 connection problem

Resolving Visual Web Developer 2005 Express and SQL Express 2005 connection problem
Written by Kwok Yao Chim   
Tuesday, 26 February 2008 12:40
I bet some of you must have come across this problem...

If you've managed to install SQL Express 2005 on your Windows XP (SP2) but you installed it after you've installed VWD 2005 Express, you may come across an error when you want to create an SQL (*.mdf) database file. The error may say:
"Connections to SQL Server files (*.mdf) require SQL Server Express 2005 to function properly."

The solution is simple...

The reason why it gives you this error is because the named instance of the SQL Server Express 2005 (when you first installed SQL Express) is different than the one defined in VWD.

You will need to define the SQL Server instance in VWD by going to:
1. Tools -> Options
Tools and then Options

2. Tick the box "Show all settings" at the bottom of the dialog box.
Options for Data Connections

3. You will see options for Database Tools and then Data Connections.
4. In the "SQL Server Instance Name", fill in the name of your SQL Server or leave it blank if you selected default SQL Server instance when install SQL Express 2005