代码之家  ›  专栏  ›  技术社区  ›  Dabblernl

Reading and writing with the same Access '97 table: Thread safety problems?

  •  0
  • Dabblernl  · 技术社区  · 14 年前

    I am maintaining a program that reads records from a Access '97 table using a Timer. A different program outside my control writes records to this table. So the reading and writing is not synchronized. I am wondering if this could occasionally lead to data corruption. Writing a testing environment is difficult for several reasons. Does someone know the answer to this, so that I can save myself the trouble of writing an emulator?

    1 回复  |  直到 14 年前
        1
  •  -2
  •   Bob77    14 年前

    通过“access 97”,我假设您指的是旧的jet 3.x格式的mdb文件。在这个老的mdb格式中,锁定和并发控制比在更现代的jet 4.x格式中要弱,因此从20世纪90年代开始,放弃旧的格式可以提高健壮性。在jet 4.x中,对行级锁定也有更好的支持,这可能会影响性能。

    But people used to use Jet 3.x tables to simulate queues all the time back in the old days. I don't recall significant problems that could be traced to data corruption. If that's what you're doing we've had MSMQ for a long time though, which offers some real benefits, for example greatly reduced network overhead over a Jet table solution.

    但是,在Jet MDB中,最常见的数据损坏源是一个客户机,它在保存脏页时死亡或失去文件服务器连接。