Meget groft:
Imports Microsoft.Office.Interop.Access.Dao
Module Module1
Sub Main()
Dim dbEng As New DBEngine()
Dim ws As Workspace
Dim db As Database
ws = dbEng.CreateWorkspace("", "admin", "", WorkspaceTypeEnum.dbUseJet)
db = ws.OpenDatabase("z:\\docs\\test.accdb", False, False, "")
db.Execute("SELECT * INTO Newtable From [ODBC;DSN=MySQL;].test")
End Sub
End Module
Du kan også have en forespørgsel på disse linjer:
SELECT * INTO Newtable FROM
[ODBC;Driver={MySQL ODBC 5.1 Driver};Server=127.0.0.1;Database=test;User=usr;Password=pwd;CLIENT_MULTI_RESULTS;Option=3;].test;