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