Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How do I connect to an older sql database using LocalDb in VS 2012?

Tags:

I am trying to construct a connection string to a 2008 SQL Express database file in VS 2012. I am getting an error dialog:

This database file is not compatible with the current instance of SQL Server. To resolve this issue, you must upgrade the database file by creating a new data connection, or you must modify the existing connection to this database file. For more information, see http://go.microsoft.com/fwlink/?LinkId=235986

I followed the link to Microsoft's always wonderfully helpful documentation (cough, cough..). When I went through the upgrade database function, I was not presented with a prompt to upgrade the file. I was really hoping to use LocalDb instead of having to do a install of SQL Express 2008. Any thoughts?

OTHER: Why hasn't Visual Studio implemented clicking on links in the error dialogs after all these years? Is it really hard to implement?

like image 205
ATL_DEV Avatar asked Mar 14 '13 18:03

ATL_DEV


People also ask

How do I connect to an existing database?

To connect to a database instanceRight-click the SQL Server node in SQL Server Object Explorer and select Add SQL Server. In the Connect to Server dialog box, enter the Server name of the server instance you want to connect to, your credentials, and click Connect.


1 Answers

my simple way:

  1. go to VisualStadio 2012
  2. In Server Explorer Windows
  3. open Data Connections
  4. Right click on ASPNETDB.MDF
  5. click on Modify Connection...
  6. a new windows open for you ... you just click OK
  7. if other windows open for you click Yes
  8. FINISH ( be Happy ) :D
like image 111
OmiD Avatar answered Nov 01 '22 12:11

OmiD