Jump to content


MySQL Visual Basic problem

  • Please log in to reply
1 reply to this topic

#1 llain

  • New Members
  • Pip
  • Newbie
  • 1 posts

Posted 16 August 2006 - 08:21 AM

    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?

#2 JadedLucidity

  • Members
  • PipPip
  • Member
  • 11 posts

Posted 16 August 2006 - 09:00 PM

I don't know if this will help or not but here it is anyways:


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.

0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users