Database Connection and Configuration using VB6 and MySQL database

The program illustrate on how to establish and configure connection between Visual Basic 6.0 and MySql database.
Steps for installations
  • Install MySql database 
  • Install ODBC driver 
  • Add a reference to the Microsoft ActiveX Data Objects 2.0 Library 
  • Declare object variable cn for connection
Code snippet

Set cn = New ADODB.connection
With cn
ectionString = "driver=MySQL ODBC 3.51 Driver;server=" & server & _
    ";database=" & dbase & ";port=3306;UID=" & user & ";PWD=" & password & ";"
End With


Programming Language : VB6
Database: MySql
Click Contact Us to request the source code