Click here to Skip to main content
15,894,460 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
See more: , +
I am using Visual Studio 2010, MS-SQL Server 2008 R2,
My project is using C# in asp web form.
I have two databases namely "test.mdf" and "database.mdf".
I already attached test.mdf and successfully working good.
But now when I attach database.mdf, it shows the following error.
Please, I help me out. I know only amateur(basic) level in asp.net.

Please click this link to see the error which it pops up.
http://goo.gl/egYsz3[^]
Posted
Comments
kbrandwijk 7-Sep-14 4:43am    
Just for future reference, you are NOT using SQL Server 2008 R2 already, if you're getting that error message. Also in your own 'solution', you mention that you have now updated your SQL Server version. So this makes no sense at all.
Bharath Balu 7-Sep-14 4:51am    
I am aware of what i was using. I used correct instance too. Still don't know why the error occured but I feel happy that I solved it.

The simple answer is that you cannot. You must upgrade to a later version of SQL Server.

Quote:
A database created by a more recent version of SQL Server cannot be attached or restored to an earlier version. This restriction is simply because an older version cannot know about file format changes that were introduced in the newer release.
 
Share this answer
 
v2
Comments
Bharath Balu 7-Sep-14 3:26am    
Thank you so much Mike :)
See this page for the internal SQL Server version numbers: http://weblogs.sqlteam.com/dang/archive/2011/07/17/internal-sql-server-database-version-numbers.aspx[^].

The error shows that you are trying to attach a SQL Server 2008 database to a SQL Server 2005 SP2 instance. Make sure you have configured your connectionstring to point to the correct SQL Server instance running on your PC. You might have multiple instances running. Open the SQL Server Configuration Manager, and check the list under 'SQL Server Services' to see the instances running on your machine.
 
Share this answer
 
I installed an updated version of SQL Server and it solved my problem. Thanks for your time to help me.
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900