以独占模式打开Access数据库

问题描述:

我希望能够编写一个以独占模式打开Access数据库的脚本,这样我就可以刷新其中的信息,而不必担心其他用户以不一致的状态访问数据库.有没有办法使用VBA或通过使用VBScript的COM接口来做到这一点?

I'd like to be able to write a script that opens a Access database in exclusive mode so I can refresh the information in it without worrying about other users accessing the database in an inconsistent state. Is there a way to do this using VBA, or through a COM interface using VBScript?

根据

According to this table of OLEDB init properties, you should add a "Mode=Share Exclusive" to your connection string.