Dim strConnectionString As String = "DRIVER={MySQL ODBC 5.1 Driver}; SERVER=localhost;UID=root; " & _
"pwd=root;database=mydatabase;option=16384;"
'*** Query ***'
Dim Conn As ADODB.Connection
Set Conn = New ADODB.Connection
Set objRec = New ADODB.Recordset
strSQL = "SELECT * FROM.... "
Conn.ConnectionString = strConnectionString
Conn.Open
objRec.Open strSQL, Conn, 1, 3
'*** Execute ***'
Dim Conn As ADODB.Connection
Set Conn = New ADODB.Connection
Conn.ConnectionString = strConnectionString
Conn.Open
strSQL = "INSERT INTO...."
Conn.Execute (strSQL)
If Err.Number <> 0 Then
Exit Function
End If
Conn.Close