Search code examples
sql-servervisual-studio-2008solutionmdfsolution-explorer

Cannot add database to an Asp.Net application


I'm unable to add an mdf database file by right clicking on the project name and clicking on "Add->New Item->SQL Server Database".

It gives me the following error...

**

Connections to SQL Server files (*.mdf) require SQL Server Express 2005 to function properly. Please verify the installation of the component or download from the URL: http://go.microsoft.com/fwlink/?LinkId=49251

**

  • I'm using SQL server 2008 enterprise edition ...but I installed it with the instance name as SQLEXPRESS since some applications expect it.
  • I've uninstalled SQL SERVER 2005 express

Any ideas why and what I should do to correct this? Thanks


Solution

  • Just specifying the instance name as SQLEXPRESS in the Instance name won't trick the system into thinking that you actually have the express version installed, so our first bullet point would not help.

    Your second point says you uninstalled SQL Server 2005 Express, which is the opposite of what you need to do.

    Did you ever have the true Express edition? (Not the Developer edition that installs with Visual Studio, but the actual SQL Server 2005 Express edition downloaded from the link you posted)?

    Edit - Added

    I see that the link takes you to the 2008 Express edition, not 2005. I would try going and getting the 2005 install from here instead: http://www.microsoft.com/express/sql/previous/register.aspx