views:

84

answers:

2

I have the following installed:

  • VS 2008 SP 1
  • ASP.NET MVC 1.0
  • SQL Express 2008
  • SQL Management Studio 2008 (for connecting to SQL2008 Server)

When I right click on the App_Data Directory and click "Add New Item", if I choose SQL Server Database and name the .MDB file, I get an 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...

What's up with that? Any help is appreciated...

+1  A: 

Is it x64 Vista? This is a known issue. The workarounds suggest there might be a hotfix (http://support.microsoft.com/hotfix/KBHotfix.aspx?kbnum=957944).

JP Alioto
A: 

This forum post suggests a fix. It says:

Try deleting the directory SQLEXPRESS (Or better rename it say SQLEXPRESS_).

It solved my problem. This directory is at following location...

C:\Documents and Settings[USERNAME]\Local Settings\Application Data\Microsoft\Microsoft SQL Server Data\SQLEXPRESS

Also, make sure that you preference to the database is "sqlexpress" in the WMD (It should be , by default).

Look at http://forums.microsoft.com/msdn/showpost.aspx?postid=98346&siteid=1

Robert Harvey