Visual Studio 2008 express not recognizing my Sql

2019-04-14 14:26发布

问题:

I recently installed in order:

Sql Server 2008 Express

Visual Web Developer Express 2008

When I right click on app_data and try to add a db it returns: 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 just recently reinstalled windows vista due to registry problems from installing visual web developer before installing sql server. This time the reverse order seemed to work fine until I noticed this problem.

I can copy an MDF file into the app_code directory, but this doesn't seem to solve my problems, as clicking the DB returns the same error.

From what I've gathered from some googling, this error occurs from several different install paths. It probably has nothing to do with 2005 installs (I had not installed any visual studio or sql server 2005s). Its possible they just never upgraded the error message. Does anyone know how to get around this? I would not mind entering in some connection strings, if that will fix the issue.

回答1:

Is it a 64bit Vista (or rather, 64bit SQL Express installation)? http://support.microsoft.com/default.aspx?scid=kb;en-us;957944&sd=rss&spid=12913

There is a known problem with having a 64bit SQL Express engine for Visual Studio 2008 integration (and it easily happens without your knowledge if you install the SQL Express separately using the web bootstrapper - atleast on my system it installed the 64bit version without telling me at all).

The link above basically tells you to uninstall all SQL Express instances, and then install the x86 SQL Express of your choice and it will start working correctly.



回答2:

I ran into this problem too on 64-bit Windows 7 (using 64-bit SQL Server Express 2008).

There are two methods of fixing this problem referenced in the Microsoft Support Knowledge Base article:

1. Workaround

To work around this problem, uninstall the 64-bit version of SQL Server Express 2008, and then install the 32-bit version of SQL Server Express 2008.

If you don't want to do the uninstall/install, then try the Hotfix method below.

2. Hotfix

A supported hotfix is now available from Microsoft. However, it is intended to correct only the problem that this article describes. Apply it only to systems that are experiencing this specific problem.

Although the article itself doesn't include a link to the hotfix, you can get it here: http://support.microsoft.com/hotfix/KBHotfix.aspx?kbnum=957944



回答3:

hi david are you ensuring that the sql express service as well as sql browser service both are running? can you connect to the same sql server express edition via management studio? if not then probably these services are not running on your box



回答4:

While I still get the sql server 2005 error, it hasn't stopped me from doing what I needed to do. In the "Database Connections" tab I am able to connect to the MDF after detaching it from Management Studio. I can also use this tab's function to create a new DB file if need be.