Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我一直在使用一个通过 ADODB 与数据库交互的旧版应用程序,并且对记录的大部分更改都遵循一个相当简单的模式:
我想知道的是,对于 ADODB 记录集,无论如何都可以提取“更改”。更改记录集的逻辑分散在各处,我需要的只是更改,而不是更改方式...
跟踪记录集中更改的任何建议(在代码中,数据库上的触发器或类似的在这里没有用)
我个人从未使用过此功能,但文档说明您可以将rs.Filter属性设置adFilterPendingRecords为显示已更改但尚未发送到服务器的记录(仅适用于批量更新模式)。
rs.Filter
adFilterPendingRecords
或者,您可以遍历记录集中的所有记录,如果该.Status属性adRecModified设置了标志,那么您可以比较每个字段的.Value和.UnderlyingValue以查看它们是否不同。
.Status
adRecModified
.Value
.UnderlyingValue