如何将C#连接到在线数据库 [英] How To Connect C# To Online Database

查看:68
本文介绍了如何将C#连接到在线数据库的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

嘿伙计们,



我要建立一个连接我们电脑的系统,以便我能够更方便地给他们留言并设定日期派对和所有这些,但我希望它连接到在线数据库。我该怎么做?



谢谢:)

hey guys,

i'm going to make a system that connects our computers so that i'm able to message them a lot easier and set dates for parties and all that, but i want it to connect to an online database. how do I do that?

thanks :)

推荐答案

这在实践中可能是一个糟糕的主意:这意味着将数据库暴露在互联网上,任何人都可以看到它。



我可能会写一个网络服务(甚至是一个需要登录的网站)和有权访问数据库 - 至少这样你就限制了对已知信息渠道的访问。



但是......如果你必须,那么你所需要的就是IP服务器的地址或名称以及相应的登录名和密码信息。如果您使用托管服务,他们将能够为您提供确切的详细信息。请注意,出于安全原因,某些主机不允许远程访问,因此您无论如何都必须检查。
That's probably a poor idea in practice: it means exposing the database to the internet, where anyone can see it.

I would probably write a web service instead (or even a website that requires log in) and have that access the database - at least that way you restrict access to known channels of information.

But...if you must, then all you need is the IP address or name of the server and appropriate login name and password information. If you are using a hosting service for this, they will be able to give you the exact details. Do note that some hosts do not allow remote access for security reasons, so you will have to check anyway.


这篇关于如何将C#连接到在线数据库的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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