我可以从VB.NET Windows基础应用程序在线访问MS SQL数据库吗? [英] Can I access MS SQL Database online from VB.NET Windows base application ?

查看:94
本文介绍了我可以从VB.NET Windows基础应用程序在线访问MS SQL数据库吗?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述





我需要帮助。我在VB.net中有一个Windows基础软件和他在MS SQL Server中的数据库。但是我想在两个不同的地方使用这个软件,而不是在线数据库,从两个不同的地方访问一个数据库。

Hi,

I need help. I have one windows base software in VB.net And his database in MS SQL Server. But I want to use this software in two different places than I need to be database online and access one database from two different places.

推荐答案

嗯,是的......并且没有。



有可能 - 您必须以管理员身份访问SQL Server实例并允许远程连接:http://support.webecs .com / kb / a868 / how-do-i-configure-sql-server-express-to-allow-remote-tcp-ip-connections-on-port-1433.aspx [ ^ ]并且可能还配置它的本地防火墙以打开正确的端口。



但是。 ..这是危险的。

您将打开实例上的每个数据库给任何拥有(或可以解决的人) )用户名/密码组合。因此,您需要首先确保所有此类SQL登录都是安全的 - 并且sa / admin必须为初学者提供!



就个人而言,我不会做到这一点:我写了一个WCF应用程序,坐在本地站点上的数据库服务器上并通过它发出所有请求。它要复杂得多,但它也很多,更安全。
Well, yes...and no.

It is possible - you have to access the SQL server instance as an admin and permit Remote Connections: http://support.webecs.com/kb/a868/how-do-i-configure-sql-server-express-to-allow-remote-tcp-ip-connections-on-port-1433.aspx[^] and probably also configure it's local firewall(s) to open the right ports.

But...it's dangerous.
You will be opening every database on the instance to anyone who has (or can work out) a username / password combination. So you need to start by ensuring that all such SQL logins are secure - and "sa/admin" has got to go for starters!

Personally, I wouldn't do it: I'd write a WCF app to sit on a "local" site to the DB server and make all requests via that. It's a lot more complex, but it's also a lot, lot safer.


这篇关于我可以从VB.NET Windows基础应用程序在线访问MS SQL数据库吗?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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