Requires Free Membership to View
As for tip and tutorials, I will shamelessly plug a site I started back in 2003 called www.vbmysql.com. At the site you can find a good-sized archive of sample code and a series of articles regarding using Visual Basic and MySQL together.
Here's a basic example of inserting data using VB6 with MYSQL from the site's sample code collection:
Dim conn As ADODB.Connection
Set conn = New ADODB.Connection
Dim rs As ADODB.Recordset
Set rs = New ADODB.Recordset
conn.CursorLocation = adUseClient
conn.ConnectionString = "DRIVER={MySQL ODBC 3.51 Driver};" _
& "SERVER=127.0.0.1;" _
& "DATABASE=test;" _
& "UID=testuser;" _
& "PWD=12345;" _
& "OPTION=" & 1 + 2 + 8 + 32 + 2048 + 16384
conn.Open
rs.Open "SELECT * FROM mytable WHERE 1=0", conn, adOpenStatic, adLockOptimistic
rs.AddNew
rs!Name = "Johnny Bravo"
rs!address = "Mama's House"
rs.Update
txtID.Text = rs!person_id
rs.Close
Set rs = Nothing
conn.Close
Set conn = Nothing
This was first published in September 2005

Join the conversationComment
Share
Comments
Results
Contribute to the conversation