0

When adding an Entity Data Model to my project I choose

-> Generate from existing Database

-> New connection

-> Data source : Sql server Database file -> browse to the file .

when clicking ok I get the following error:

A network-related or instance-specific error occurred while establishing a connection to SQL Server. The server was not found or was not accessible. Verify that the instance name is correct and that SQL Server is configured to allow remote connections. (provider: SQL Network Interfaces, error: 26 - Error Locating Server/Instance Specified)

any ideas what could be the cause for this?

I've removed SQL server 2008 R2 and installed sql server 2008 express

now I get a different error concerning the Northwind sample database.

The database '...' cannot be

opened because it is version 661. This server supports version 662 and earlier. A downgrade path is not supported.

Could not open new database '...'. CREATE

DATABASE is aborted.

An attempt to attach an auto-named database for file C:\.. failed. A

database with the same name exists, or specified file cannot be opened, or it is located on UNC share.

I'm guessing I would of gotten this error with the SQL SERVER R2 installation if it would of been able to connected.

PowerStat
  • 3,757
  • 8
  • 32
  • 57
eran otzap
  • 12,293
  • 20
  • 84
  • 139
  • Does your SQL Express/Compact/LocalDB runs? – haim770 Jun 05 '13 at 09:41
  • i have an SQL server 2008 R2 installed and running , iv'e installed sql server 2008 express as well because i understood that visual studio needs it to connected to a db. the server explorer in VS has no problem connecting to that Database. – eran otzap Jun 05 '13 at 09:47
  • on `Connection Properties` dialog, click `Advanced` and paste the bottom line starting in `Data Source=` here. – haim770 Jun 05 '13 at 11:39
  • Data Source=.\SQLEXPRESS;AttachDbFilename="C:\Program Files\Microsoft SQL Server\MSSQL10_50.MSSQLSERVER\MSSQL\DATA\NORTHWND.MDF";Integrated Security=True;Connect Timeout=30;User Instance=True – eran otzap Jun 05 '13 at 11:50
  • See http://stackoverflow.com/questions/4257684/sql-server-attach-incorrect-version-661 for the new error – haim770 Jun 05 '13 at 12:03
  • it seems that SQLExpress is only for work via VS , it does not seem to have a management studio of it's own any ways i would still like to solve the original problem i'm re installing R2 , i think the Original problem was that my R2 installation Name instance was not SQLEXPRESS .. – eran otzap Jun 05 '13 at 12:23
  • That's not true. SQLExpress shoud work just like (stripped down version of) regular SQL Server. – haim770 Jun 05 '13 at 14:15

0 Answers0