Jump to content

MySQL Visual Basic problem


llain

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?
Link to comment
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.

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

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.