1. 程式人生 > 其它 >Access DB - Using SQL Server DB for DSC

Access DB - Using SQL Server DB for DSC

背景

上一篇《Using SQL Server DB for DSC》中,核心機制就是這個圖:

我一開始的理解是這樣的,並且很長時間這麼理解

還驚訝於“雙向同步”的設計。
其實並不是這樣的

Access Linked Table

When you link to a table in an Access database, Access creates a new table, called a linked table, which maintains a link to the source records and fields. Any changes you make to the data in the source database are reflected in the linked table in the destination database, and vice versa.

https://support.microsoft.com/en-us/office/import-or-link-to-data-in-another-access-database-095ab408-89c7-45b3-aac2-58036e45fcf6#Link to data in another Access database

Although linked tables can be used as regular Microsoft Access Database tables, it’s important to keep in mind that they aren’t actually stored in the Microsoft Access database. Each time data is viewed in a linked table, Microsoft Access has to retrieve records from another file. This can take time, especially if the linked table is on a network or in an SQL database.

http://www.eident.co.uk/2017/03/performance-microsoft-access-databases/

所以,Access本身並不儲存資料,只是通過ODBC driver傳送資料庫操作到SQLServer。當你開啟.mdb檔案看到資料是因為做了一次查詢而已。