What is the best way to synchronize data between MS Access and MySQL?

前端 未结 5 1369
面向向阳花
面向向阳花 2020-12-03 23:18

I have an access database on a windows machine, which I must import into mysql on a linux webserver. At the moment the access dabatbase table is exported as a text file, aut

5条回答
  •  忘掉有多难
    2020-12-03 23:56

    Why not link the tables through ODBC as suggested by Keltia, and then use a series of queries to add records that are missing and to update changed records. The queries can be run through VBA. ADO will also work well with MySQL and Access.

    Some notes on code used in Access:

       Set db = CurrentDb
       strSQL = "Insert INTO [ODBC;DSN=DSNName;].NameOfMySQLTable " _
       & "Select AnyField As NameOfMySQLField FROM AnyAccessTable;"
    
       db.Execute strSQL, dbFailOnError
       End Sub
    

    -- http://forum.lessthandot.com/viewtopic.php?f=95&t=3862

提交回复
热议问题