add sql server data connection in visual studio

本小妞迷上赌 提交于 2019-12-12 16:05:34

问题


I will like to connect to sql express from visual studio. when I go to Database Explorer and click on add a new data connection I don't get the option "Microsoft SQL Server".

I will like to connect to a SQL Server instance. Why does visual studio does not give me that option. I have installed sql express on this computer:

edit

Take a look how in this other computer I have more options:


回答1:


It looks like this list is opulated based on installed DDEX (Data Designer Extensibility) providers. I am guessing here, but most likely your DDEX providers didn't install correctly or somehow got uninstalled.

Did you try repairing your Visual Studio 2010 installation?




回答2:


I ran into the same exact problem when trying to do some experimental side-project work at home using Visual Studio Express 2010.

According to http://social.msdn.microsoft.com/Forums/en-US/vssetup/thread/5ac1c88b-ba4a-472b-a734-872febdceb0a/ it all comes down to a licensing restrictrion on Visual Studio Express, which isn't allowed to connect to "remote" data sources (which ".\sqlexpress" shouldn't be considered, IMO).

Maddeningly, this is just a restriction of Visual Studio Express 2010: Visual Web Developer 2010 Express (love those MS names) does NOT have this restriction.

Fortunately, this provides a workaround, as I found in one of the answers on another post here: Connecting to SQL Server with Visual Studio Express Editions

Essentially the workaround is this: open your solution in Visual Web Developer and add the ADO.NET Entity Data Model there, then save the solution and open it back up in Visual Studio Express and continue as normal.




回答3:


  1. Click on add connection by right clicking on the data connection tab on server explorer.
  2. In server name type the name of your server. i.e if you installed sql server management studio copy that name from "Connect to database" Window appears on the start up and paste that name to the server name drop down box.
  3. select your database from the list over there. So simple.


来源:https://stackoverflow.com/questions/9107566/add-sql-server-data-connection-in-visual-studio

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!