本文介绍了用于在DAO中指定当前打开的数据库的A97语法...的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

假设我在一个开放的数据库(northwind.mdb)中。在我已经dbs'ld dbsNorthwind

作为数据库之后,有没有

a更短的做法:


设置dbsNorthwind = OpenDatabase(Northwind.mdb)


???


或者,我是否应始终使用上述语法

的DAO情况我只是想在数据库中更新记录集更新
我认为合适的
记录?

解决方案






Suppose I''m in an open database (northwind.mdb). Is there
a shorter form of doing the following after I''ve dim''d dbsNorthwind
as database...

Set dbsNorthwind = OpenDatabase("Northwind.mdb")

???

Or, should I always use the above syntax in DAO situations where
I just want to move about a recordset in the database updating
records as I see fit?

解决方案







The latter can fail in certain cases (immediately after a wizard has
been run).

CurrentDB().Name will never return anything other than the name of
db that the human user thinks is open in the user interface.

--
David W. Fenton http://www.bway.net/~dfenton
dfenton at bway dot net http://www.bway.net/~dfassoc


这篇关于用于在DAO中指定当前打开的数据库的A97语法...的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

11-02 12:35