Want to protect your cyber security and still get fast solutions? Ask a secure question today.Go Premium

x
?
Solved

Error from VS2008, requiring SQL Server 2005, refuses to acknowledge SQL 2008

Posted on 2009-04-26
4
Medium Priority
?
500 Views
Last Modified: 2013-11-26
Hi

I'm using Visual Studio 2008 SP1, trying to create a Web Project. When I attempt to add a new SQL database (an 'mdf' file), I get the message "Connections to SQL Server files (*.mdf) require SQL Server Express 2005 to function properly."

I have SQL Server 2008 installed. I have  set my instance in Tools->Options->Database Tools->Data Connections->SQL Server Instance Name to point to 'newdell1\sqlserver2008'.

I have been all over the web and MSDN to try to find a solution, but I can't seem to find one.

The Server Explorer in VS2008 allows me to work directly with SQL Server 2008. I just can't get the Sql Server database file template to create a SQL Server 2008 mdf.
0
Comment
Question by:Spotzo
  • 2
  • 2
4 Comments
 
LVL 26

Expert Comment

by:Anurag Thakur
ID: 24239543
Please check the version of the newly created SQL Server database files.

Attach the database files in SQL Server Management Studio, right-click the database name, choose Properties, then check Compatibility level in the Options tab.

If the Compatibility level of the newly created database files is "SQL Server 2005 (90)", I think maybe there are both SQL Server 2005 Express and SQL Server 2008 Express on your machine.

If so, please try to modify the SQL Server Instance Name in Visual Studio 2008.
Go to Tools -> Options -> Database Tools -> Database Connections, fill the SQL Server Instance Name with the name of SQL Server 2008 Express instance. Then create a new database in Visual Studio 2008 and check its version to confirm.
0
 

Author Comment

by:Spotzo
ID: 24241714
ragi0017- That is a direct cut-n-paste from MS ASP.NET forums, from some guy named Jian Kang at Microsoft. It doesn't solve the problem.
0
 
LVL 26

Expert Comment

by:Anurag Thakur
ID: 24241830
i know its a copy and paste
have you installed sql management studio to connect to your sql express databases.
have you got 2 versions of sql express - 2005 & 2008?
0
 

Accepted Solution

by:
Spotzo earned 0 total points
ID: 24243653
ragi0017:
"i know its a copy and paste
have you installed sql management studio to connect to your sql express databases.
have you got 2 versions of sql express - 2005 & 2008?"

I do not have SQL Express 2005 installed; I have SQL 2000 (MSDE) on my machine, but it's not running. The only active database engine that's active is 2008.

Yes, I have SSMS installed, and it works fine. I am able to read and write databases under SS2008.  I can also access them problematically with ADO through VB.NET. I can even see and manipulate SS2208 databases in the Server Explorer portion of Visual Studio 2008.

The problem appears when I try to add a new SQL Server database to a web project from the "Add New Item" menu. That is when VS complains that using an .MDF file requires SSE 2005.

-------------------------------------------------------

I don't know for sure which directory it was, but one of the changes I made seems to have solved my problem.

It seems to be related to deletion of directories under "'C:\Documents and Settings\Default\Local Settings\Application Data\Microsoft\". I deleted some existing SQL directories, which forced them to be recreated.  

I wish I could say which directories did the trick for me. I can say the two directories that show today's date in the "Date Created" column are "C:\Documents and Settings\Default\Local Settings\Application Data\Microsoft\Microsoft SQL Server"  and "C:\Documents and Settings\Default\Local Settings\Application Data\Microsoft\Microsoft SQL Server Data" .
0

Featured Post

Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

In this article I will describe the Detach & Attach method as one possible migration process and I will add the extra tasks needed for an upgrade when and where is applied so it will cover all.
This shares a stored procedure to retrieve permissions for a given user on the current database or across all databases on a server.
Whether it be Exchange Server Crash Issues, Dirty Shutdown Errors or Failed to mount error, Stellar Phoenix Mailbox Exchange Recovery has always got your back. With the help of its easy to understand user interface and 3 simple steps recovery proced…
As many of you are aware about Scanpst.exe utility which is owned by Microsoft itself to repair inaccessible or damaged PST files, but the question is do you really think Scanpst.exe is capable to repair all sorts of PST related corruption issues?

578 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question