如何使用C#桌面应用程序设置在线数据库(SQL或MYSQL)? [英] How to Set Online DataBase (SQL or MYSQL )with C#Desktop Application?

查看:82
本文介绍了如何使用C#桌面应用程序设置在线数据库(SQL或MYSQL)?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

大家好我的要求就是说我有一个桌面应用程序(C#),它需要从不同位置的几个用户收集信息。但我怎么能这样做?我可以将数据库托管到托管网站吗?如果是这样我们如何做到这一点?我怎么能得到连接字符串?



非常感谢!!!

Hi guys my requirement is Lets say I have a Desktop application (C#) and its required to gather information from several users from different locations. But how Could I Do that ? can I Host the DB to a Hosting Site ?if So How we could do that? how could I get the Connection String ?

Thanks a Lot!!!

推荐答案

您必须使用IP地址连接到远程托管sql server



点击这里 -

数据源= 190.190.200.100,1433;网络库= DBMSSOCN;

初始目录= myDataBase;用户ID = myUsername;密码= myPassword;

DBMSSOCN = TCP / IP是如何使用TCP / IP而不是命名管道。在数据源的末尾是要使用的端口。 1433是SQL Server的默认端口。



更多细节,你可以看到这里

http://www.connectionstrings.com/define-sql-server-network-protocol/ [ ^ ]



现在进行托管,联系Sql Server托管服务提供商并选择一个计划并托管一个SQL Server。服务提供商将为您提供您将在连接字符串中使用的ipaddress和端口。





其他选项(最适合我) )是使用Microsoft Sync Framework将服务器数据同步到本地数据。与直接通过ip连接相比,这将非常快速和强大。



希望这个信息有帮助!



谢谢,

干杯
You have to use IP Address to connect to remote hosted sql server

Check here -
Data Source=190.190.200.100,1433;Network Library=DBMSSOCN;
Initial Catalog=myDataBase;User ID=myUsername;Password=myPassword;
DBMSSOCN=TCP/IP is how to use TCP/IP instead of Named Pipes. At the end of the Data Source is the port to use. 1433 is the default port for SQL Server.

More details, you can see here
http://www.connectionstrings.com/define-sql-server-network-protocol/[^]

Now for hosting, contact a Sql Server Hosting Service provider and choose a plan and host a sql server. The Service provider will provide you the ipaddress and port which you will use in your connection string.


Other option (most preferable to me) is to use Microsoft Sync Framework which sync server data to your local data. This will be pretty fast and robust compared to connectiong directly through ip.

Hope this info helps!

Thanks,
Cheers


hi
您可以从服务提供商处尝试Viritual私人服务器

或者您可以建立您自己的服务器通过互联网使用端口转发调制解调器的静态IP必须
hi You can try Viritual private server from your service provider
or you can establish your own server through internet using port forwarding your modem for this static IP is must


这篇关于如何使用C#桌面应用程序设置在线数据库(SQL或MYSQL)?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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