Jump to content

Archived

This topic is now archived and is closed to further replies.

llain

MySQL Visual Basic problem

Recommended Posts

Hey,
    I have a MySQL database with Visual Basic user interface implemented and working on a computer, however encounter problems when I want to move the project to another computer. I have moved both the visual basic project and MySQL database to identical directories on the hard drive, and edited the code to connect to a MySQL server on the second machine. Using the MySQL administrator, the required database is easily visible, however VB frequently comes up with the error "Data source name not found and no default driver specified" when the code is run. I have triple checked that the MySQL ODBC 3.51 driver is installed on the machine.

connectString = "DRIVER={MySQL ODBC 3.51 Driver};" _
& "SERVER=localhost;" _
& "DATABASE=sp-800;" _
& "UID=root;" _
& "PWD=123456;" _
& "OPTION=" & 1 + 2 + 8 + 32 + 2048 + 16384


Any ideas? What am I not doing right?

Share this post


Link to post
Share on other sites
I don't know if this will help or not but here it is anyways:

http://dev.mysql.com/tech-resources/articles/vb-blob-handling.html

That gives an example to connecting to a mysql databse with vb. It might help, also have you tried
just using the Data Environment Options (Data Tools—Options Dialog Box)? Atleast that is what it is called in VB 6. I'm sure there is something similar in your VB development environment.

Share this post


Link to post
Share on other sites

×

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.