Click here to Skip to main content
Rate this: bad
good
Please Sign up or sign in to vote.
See more: C# VS2010
i have a problem in doing my database connectivity,
in windows form when i add a new service based database by clicking new item it gives me error. i will state that is
"connection to sql server database files .mdf, require sql server 2005 express or sql server 2008 express tobe installed and running on the local computer"
plz guyz i want to made my project but because of this error i cant proceed.
i have installed a database named sql server 2012 express local db
but its not working.i have just installed that and nothing done with that new db 2012 express
can anyone helpme out of it
thanks in advance
Posted 6-Aug-12 8:15am
Comments
Wes Aday at 6-Aug-12 14:22pm
   
So the message tells you that you have to install SQL Server 2005 or 2008 and you go and install SQL Server 2012?
Sandeep Mewara at 6-Aug-12 14:33pm
   
Comment from OP:
yes its tells me that by going on that link i have installed the newest database sql server 2010 but after that the error is not going. I cant create a new database connection because of that error
qureshiaquib at 6-Aug-12 14:27pm
   
yes
its tells me that by going on that link i have installed the newest database sql server 2010 but after that the error is not going.
I cant create a new database connection because of that error
Sergey Alexandrovich Kryukov at 6-Aug-12 14:31pm
   
And what prevents you from installing it?
--SA
ryanb31 at 6-Aug-12 14:31pm
   
Are you trying to connect to a database file (mdf) or to a SQL instance?
qureshiaquib at 6-Aug-12 14:37pm
   
noting prevents. i have installed the sql server 2012 as the error given but at last the error is not going @ sergey
i dont know about instance and all thing i am new to programming world.
i want to connect to a database by windows form so i want to use datagridview in tool. But before that i have to solve this error then only my sqlconection will proceed
@ ryan31
Philip Stuyck at 6-Aug-12 14:46pm
   
Have you actually created a database in sqlserver 2012.
If you are new to the programming world, do you have any idea about what you are doing. Read some books.
qureshiaquib at 6-Aug-12 15:39pm
   
yup i know little bit. In other computer in my lab i have used that windows form type. But in my pc its not working, no one knows this message? All are new to this? I thought many have faced such kinda situation
Rate this: bad
good
Please Sign up or sign in to vote.

Solution 1

Did you follw these steps:
http://msdn.microsoft.com/en-us/library/hh500335%28v=vs.103%29.aspx[^]
 
Looks like you might be missing a service pack on you Visual Studio package...
 
I currnely have VS 2010 and SQL 2012 without any problems, so...
  Permalink  
Comments
qureshiaquib at 6-Aug-12 20:13pm
   
yup after installation my package fails to isntall sql management package.
So how to install this package seperately?
Rate this: bad
good
Please Sign up or sign in to vote.

Solution 2

You can not simply attach and run a database file (.mdf) to a different engine than the one that created it. There might be several differences between them. You can use the backup-restore method[^], or you will probably need to upgrade the database: http://msdn.microsoft.com/en-us/library/ms189625.aspx[^]. Read also this: http://www.mssqltips.com/sqlservertip/1436/upgrading-sql-server-databases-and-changing-compatibility-levels/[^]
  Permalink  

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



Advertise | Privacy | Mobile
Web04 | 2.8.140926.1 | Last Updated 6 Aug 2012
Copyright © CodeProject, 1999-2014
All Rights Reserved. Terms of Service
Layout: fixed | fluid

CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100