我如何...通过visual studio 2010连接到远程数据库 [英] How do I...connect to remote data base through visual studio 2010

查看:114
本文介绍了我如何...通过visual studio 2010连接到远程数据库的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

嗨所有

i有在线数据库

iam试图通过visual studio 2010连接到它

通过输入服务器名称和密码和用户ID

但无法连接

可以帮助我吗?

hi all
i have online data base
iam trying to connect to it through visual studio 2010
by putting the server name and password and userid
but can not connect
could any one help me ?

推荐答案

有很多可能的问题,从是否配置为接受远程连接的数据库?开始。 - 许多不是出于安全原因 - 最后是你的证书是否正确?。不幸的是,错误消息通常不是很有帮助(有时候我故意怀疑,所以请防止向黑客提供他们做错的信息)。



首先尝试直接在VS中与服务器资源管理器窗格建立连接:

1)打开服务器资源管理器。

2)右键单击数据连接并选择添加连接

3)在随后的对话框中,选择您的数据源和数据库,指定安全信息,然后按测试连接按钮。

4)当连接正常时,按确定

5)在服务器资源管理器窗格中突出显示数据库,然后查看属性窗格。将显示连接字符串的工作示例,您可以将其复制并粘贴到您的应用程序或配置文件中。



如果测试连接失败,您需要查看在错误消息密切 - 它可能会给你一个关于问题可能是什么的线索。但如果没有这个,我们都在黑暗中工作!
There are a lot of possible problems, starting with "is the DB configured to accept remote connections?" - many aren't for security reasons - and ending with "are your credentials correct?". Unfortunately, the error messages generally aren't very helpful (sometimes I suspect deliberately so, so prevent giving hackers information on what they are doing wrong).

Start by trying a connection directly in VS with the Server Explorer pane:
1) Open Server Explorer.
2) Right click "Data connections" and select "Add connection"
3) In the dialog that follows, select your DataSource, and database, specify the security info, and press the "Test connection" button.
4) When the connection works, press "OK"
5) Highlight your database in the Server Explorer pane, and look at the Properties pane. A working example of the connection string will be shown, which you can copy and paste into your app or config file.

If the test connection fails, you need to look at the error message closely - it may give you a clue as to what the problem might be. But without that, we are all working in the dark!


这篇关于我如何...通过visual studio 2010连接到远程数据库的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆