C#通过不同的Internet访问连接到SQL [英] C# connect to SQL via different internet access

查看:93
本文介绍了C#通过不同的Internet访问连接到SQL的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

亲爱的家伙,



我真的需要帮助。我有C#windows应用程序,我想从其他计算机连接到SQL,Internet Access应该是不同的,例如,我有来自一个城市的SQL,我想从其他城市连接它。



我只需要连接码。



问候,

Karam Ibrahim



我尝试了什么:



我知道如何通过WiFi通过相同的Internet访问连接到SQL 。

Dear Guys,

I really need help. I have C# windows application and I want to connect to SQL from other computer and the Internet Access should be different, for example, I have SQL from one City and I want to connect it from other City.

I just need the connection code.

Regards,
Karam Ibrahim

What I have tried:

I know how to connect to SQL via same Internet Access via WiFi.

推荐答案

如果SQL服务器实例配置为允许远程访问,则完全相同。如果不是,那么无论您尝试什么,都无法做到。



所需要的只是连接字符串中正确的IP地址或域名而不是你的本地信息。您要连接的SQL Server实例的数据库管理员应该能够为您提供所需的所有信息,包括要使用的相应用户名和密码 - 远程连接从不使用集成安全性,因为它太不安全。
It's exactly the same, provided teh SQL server instance is configured to allow remote access. If it isn't, then you can't do it no matter what you try.

All you need is the right IP address or Domain Name in the connection string instead of your "local" information. The DB Admin for the SQL Server instance you want to connect to should be able to give you all the info you need, including the appropriate Username and password to use - remote connections never use Integrated security as it's too insecure.


这篇关于C#通过不同的Internet访问连接到SQL的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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