[Q] VB6 and SQLyog Connect to Network Database
Hi All,
Need your help.
I want to connect my VB6 and SQLyog application database from my PC client to Network Database.
Right now, i only can do connect my database thru my local PC (installed SQLyog and VB6). Is there any codes to connect my a VB6 to SQLyog database via network? Thanks.
Here's my current codes for local connection of my VB6 and SQLyog:
Code:
'connect to MYSQL Server
strString = "Server=localhost;driver={MySQL ODBC 3.51 Driver};database=NPI;dsn=;"
cnMySql.CursorDriver = rdUseOdbc
cnMySql.Connect = strString
cnMySql.EstablishConnection
Form1.Show
thanks in advanced.
Re: [Q] VB6 and SQLyog Connect to Network Database
Thread moved to the 'Database Development' forum (the 'VB6' forum is only meant for questions which don't fit in more specific forums)
Just change the server in your connection string:
Quote:
Originally Posted by
disinwebe
Code:
'connect to MYSQL Server
strString = "Server=localhost;driver={MySQL ODBC 3.51 Driver};database=NPI;dsn=;"
Re: [Q] VB6 and SQLyog Connect to Network Database
Quote:
Originally Posted by
si_the_geek
Thread moved to the 'Database Development' forum (the 'VB6' forum is only meant for questions which don't fit in more specific forums)
Just change the server in your connection string:
thanks sir..
after changing the server, here's what i encountered. Please help check. Thanks.
Code:
strString = "Server=aipsbu2;driver={MySQL ODBC 3.51 Driver};database=wph_online;dsn=;"
here's the login form appeared
http://i54.tinypic.com/dp8geo.png
and here's the error message..
http://i52.tinypic.com/2s91xle.png
thanks in advanced.
Re: [Q] VB6 and SQLyog Connect to Network Database
Check the examples at the connection strings link in my signature, there might be something else you need to do.
You might also need to set up MySQL on the 'server' to allow remote connections.