简体   繁体   中英

How to make SQL Server Connection (not from file) appear in ADO.Net Connection Model Wizard?

I am trying to add a connection to Adventureworks on a new development machine running VS 2010. I have SSMS running and am able to query the Adventureworks database. However, when I click “New Connection” (steps followed below after *) , I do not see SQL Server connection as an option. Is there a way to configure VS 2010 so that it sees my localhost connection to SQL Server?

Second option: When I try using the option Microsoft SQL Server from database file, whenever I browse to the mdf file for Adventureworks, I always see the message 'file in use', even though I have only one instance of VS 2010 open and SSMS is closed.

  • steps i followed were new project class library right click solution explorer add new item ado.net entity data management new connection

Just type in localhost as the server name, test the connection and click Ok. It will be saved, next time it will appear in the list.

  • The Data Source type is set to "Microsoft SQL Server (SqlClient)"

If this doesn't pop up in your screen then install SQl Server Native Client here: http://msdn.microsoft.com/en-us/sqlserver/ff658533.aspx

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM