问题描述
如果Clint在其他城市,而服务器在其他城市,那么连接字符串将是什么
这是本地计算机的连接字符串.
< pre lang ="vb">
公共函数connection()作为SqlConnection
con =新的SqlConnection(&"server =(local); database = info; uid = sa; pwd =& quot;)
返回con
最终功能
请任何人告诉我连接字符串会出现什么
我觉得好像
公共函数connnection()作为SqlConnection
con =新的SqlConnection(&服务器= ipaddress/192.168.1.1;数据库=信息; uid = sa; pwd =& quot;)
返回con
结束功能</pre>
如果他正在使用DSL Internet连接,那么我如何知道他的IP以及如何与他的计算机连接?
If a Clint is in other city and server is other city then what will be connection string
This is connection string fro local machine.
<pre lang="vb">
Public Function connection() As SqlConnection
con = New SqlConnection("server=(local);database=info;uid=sa;pwd=")
Return con
End Function
Please any one tell me what will be there CONNECTION string
I think it seems like
Public Function connnection() As SqlConnection
con = New SqlConnection("server=ipaddress/192.168.1.1;database=info;uid=sa;pwd=")
Return con
End Function</pre>
If he is using dsl internet connection so how I can know his ip and how I connect with his computer?
推荐答案
Data Source=Your Public IP Address,1433;Network Library=DBMSSOCN;Initial Catalog=YouDataBase;User ID=myUsername;Password=myPassword;
这假定Clint需要连接到您计算机上的数据库,具有数据库的计算机不会启动连接.
This assumes that Clint needs to connect to the database on your computer, the computer with the database does not initiate the connection.
这篇关于如何制作在线软件?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!