Connecting To A Database
First of all, you need to download MySQL ODBC 3.51 Driver, here is the link for it:
http://dev.mysql.com/downloads/connector/odbc/3.51.html
Then once it has installed, open up VB6 and make a new project, then go to Project - > References, then tick these:
Microsoft ActiveX Data Objects 2.8 Library
Microsoft DAO 3.6 Object Library
Now here is the code: Code:
Set dbMaster = New ADODB.Connection
Set rsProducts = New ADODB.Recordset
dbMaster.ConnectionString = "DRIVER={MySQL ODBC 3.51 Driver};SERVER=localhost;Database=DBNAME;UID=DBUSER;PWD=DBPASS"
dbMaster.Open
Now figure out how to do queries etc.
This isn't my tutorial just thought people would find it usefull!