Problem solve Get help with specific problems with your technologies, process and projects.

Accessing remote MySQL DBs in VB6

MySQL expert Scott Noyes recommends downloading ODBC to connect within your VB project.

I'm looking for a way to access and control remote MySQL DBs in VB6 using either sockets or a free VB control. Do you have any examples of how to manipulate them?

MySQL supports ODBC. Download the ODBC drivers. In your VB project, add the Microsoft Remote Data Object and connect. Your connection code might look something like this:

Dim cnMySql As New rdoConnection
cnMySql.CursorDriver = rdUseOdbc
cnMySql.Connect = "DRIVER={MySQL ODBC 3.51 Driver};" & _
 "SERVER=yourHostName;PORT=3306;" & _
 "DATABASE=dbName;" & _
 "UID=yourUserName;PWD=yourPassword;" & _
Check the values for the OPTION parameter.

Dig Deeper on Linux servers

Have a question for an expert?

Please add a title for your question

Get answers from a TechTarget expert on whatever's puzzling you.

You will be able to add details on the next page.

Start the conversation

Send me notifications when other members comment.

Please create a username to comment.