将sql和vb.net应用程序连接到其他计算机以共享数据 [英] connect sql and vb.net application to other computers to share data

查看:90
本文介绍了将sql和vb.net应用程序连接到其他计算机以共享数据的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

美好的一天...我在使用sql server时遇到问题

我的问题是我用vb.net创建了一个应用程序并将其连接到sql server。但我想知道如何将sql连接到其他计算机,以便当我在计算机上安装我的应用程序时,用户可以将数据从他们的PC输入PC,我将其称为我的服务器。这意味着其他计算机可以在它们之间共享数据,也可以从连接到服务器的任何其他PC上检索数据...



谢谢。如果任何人可以提供帮助,我将不胜感激。

Good day guys...i have a problem with working with sql server
My problem is i have created an application with vb.net and connected it to sql server. But i want to know how to connect sql to other computers so that when i install my application on the computers the users can enter data from their PC to the PC which i will claim as my server. which means that the other computers can share data among themselves and also retriever data from any other PC which is connected to the server...

thanks. I will appreciate it if any one can help.

推荐答案

首先,您需要在connectionString中将您的服务器名称而不是(local)作为数据源。
first you need to give your server name instead of (local) as datasource in connectionString.


你好试试这个连接字符串



Hi try this Connection String

Data Source=ServerName/ServerIpAddress,1433;Network Library=DBMSSOCN;
Initial Catalog=myDataBase;User ID=myUsername;Password=myPassword;







确保使用Sql Configuration Manager在SQl服务器中启用TCp / IP,并使用管理工作室在您的sql server中启用允许远程连接



链接启用远程连接和TCP / IP和防火墙保护



HTTP://博客.msdn.com / b / walzenbach / archive / 2010/04/14 / how-to-enable-remote-connections-in-sql-server-2008.aspx [ ^ ]





链接到启用TCP / IP

http: //msdn.microsoft.com/en-us/library/bb909712(v=vs.90).aspx [ ^ ]




Be Sure to Enable TCp/IP Enabled in SQl Server using Sql Configuration Manager and also enable Allow remote connection in you sql server using management studio

link to enable Remote Connection and TCP/IP and Firewall protection
is
http://blogs.msdn.com/b/walzenbach/archive/2010/04/14/how-to-enable-remote-connections-in-sql-server-2008.aspx[^]


link to Enable TCP/IP
http://msdn.microsoft.com/en-us/library/bb909712(v=vs.90).aspx[^]


这篇关于将sql和vb.net应用程序连接到其他计算机以共享数据的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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