Convert VB6/Access to VB6/Mysql - Programmers Heaven

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!


Welcome to the new platform of Programmer's Heaven! We apologize for the inconvenience caused, if you visited us from a broken link of the previous version. The main reason to move to a new platform is to provide more effective and collaborative experience to you all. Please feel free to experience the new platform and use its exciting features. Contact us for any issue that you need to get clarified. We are more than happy to help you.

Convert VB6/Access to VB6/Mysql

samuelmoneillsamuelmoneill Posts: 14Member

I am new to VB. I have experience in connecting mysql to PHP.

I have been asked to change an existing application written in VB6(connected to Access databases) to VB6(Connected to mysql database).

Can anyone tell me how to connect VB6 to mysql? Add as much detail as possible.

This is a snippet of the current code I have for VB6(Access).

Private Sub Command1_Click()
full_log_form.Visible = True
main.Visible = False

rs.Open ("SELECT * FROM [table1]"), DataEnvironment1.Connection1, adOpenStatic, adLockOptimistic 'open table1 in connection2
If Not rs.BOF Then
End If
Do Until rs.EOF
temp_string = rs.Fields("Client").Value
list_string = rs.Fields("Client").Value
For i = 0 To (30 - Len(temp_string))
list_string = list_string & " "
Next i
list_string = list_string & rs.Fields("Serial") & vbTab & rs.Fields("Alarm") & vbTab & rs.Fields("DateRec") & vbTab & rs.Fields("Time")
full_log_form.List1.AddItem list_string

'full_log_form.List1.AddItem rs.Fields("client") & vbTab & rs.Fields("Serial") & vbTab & rs.Fields("Alarm") & vbTab & rs.Fields("DateRec") & " " & rs.Fields("Time")
End Sub

Any help would be grately appreciated.
Sign In or Register to comment.