vb6连接到wamp服务器 [英] vb6 connection to a wamp server
问题描述
我在LAN上将vb 6.0连接到wamp(mysql,myphpadmin)服务器时遇到问题。它使用localhost连接到同一台笔记本电脑上的服务器,但是其他Pcs使用ip地址无法访问它。可能是什么问题呢?拜托,我需要你的帮助。 OS = windows 7.下面是我的连接代码:
Public con As New ADODB.Connection
con.ConnectionString =Driver = { MySQL ODBC 3.51 Driver}; Server = 192.168.0.102; Database = furniture1; User = root; Password =; Port = 3306 Option = 1 + 2 + 8 + 32 + 2048 + 16384;
con 。打开
con.CursorLocation = adUseServer
结束Sub
I have problem connecting vb 6.0 to wamp(mysql, myphpadmin) server on my LAN. It connects to server on the same laptop using localhost but cannot be accessed by other Pcs using ip address. What could be the problem? Please, i need your help on this. OS=windows 7. below is my connection code:
Public con As New ADODB.Connection
con.ConnectionString = "Driver={MySQL ODBC 3.51 Driver};Server=192.168.0.102;Database=furniture1; User=root;Password=; Port=3306 Option=1 + 2 + 8 + 32 + 2048 + 16384;"
con.Open
con.CursorLocation = adUseServer
End Sub
推荐答案
如果我理解你的问题是正确的,你的SQL服务器在其他机器上,你通过你机器上的应用程序访问它...对吧???
首先检查你的服务器是否在你正在访问的机器上ping。
检查
SQL Server配置管理器
- > SQL协议
- > TCP / IP已启用
还要检查服务器IP是否以SQL本机客户端配置显示别名
我认为这可能会解决您的问题。
If i am right in understanding your problem, your sql server is on other machine and you are accessing it through your application on your machine... Right???
First check if your server is pinging through the machine where your are accessing.
Check that in
SQL Server Configuration Manager
--> Protocols for SQL
--> TCP/IP Enabled
Also check whether the server IP is displayed in SQL native client configuration Aliases
I think this might solve your issue.
这篇关于vb6连接到wamp服务器的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!