0

Hi guys.! Good day!

I have a one windows xp computer which ive installed wamp(windows apache mysql) package. I want to connect to this computer using one computer on a network. The code works fine when i run the program on this server computer because i will just specify the server name to "localhost".But when i run the program to another computer and replace localhost with the name of the computer which the mysql server installed, it will returned error. My code below(pls correct).

Public datasourcepath, usernamelog, passwordlog, databasenamelog As String


Sub ConnServer()

'servername ="\\ADMINSERVER" where mysql is installed
datasourcepath = servername
usernamelog = "admin"
passwordlog = "enaonline"
databasenamelog = "enamysqldb"
db_port = ""

constr = "Provider=MSDASQL.1;Password=;Persist Security Info=True;User ID=;Extended Properties=" & Chr$(34) & "DRIVER={MySQL ODBC 3.51 Driver};DESC=;DATABASE=" & databasenamelog & ";SERVER=" & datasourcepath & ";UID=" & usernamelog & ";PASSWORD=" & passwordlog & ";PORT=" & db_port & ";OPTION=16387;STMT=;" & Chr$(34)
Set conn = New ADODB.Connection
conn.Open constr

Pls help..

Thank you and God bless on this mpther earth.
Exit Sub

2
Contributors
2
Replies
3
Views
8 Years
Discussion Span
Last Post by blocker
0

Even if it is configured to listen to all connection it still gets an error. Howeve, can i use the ip address of the server instead of its name.?

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.