用于在DAO中指定当前打开的数据库的A97语法... [英] A97 syntax for specifying currently open database in DAO...

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

问题描述

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

作为数据库之后,有没有

a更短的做法:


设置dbsNorthwind = OpenDatabase(Northwind.mdb)


???


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

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

解决方案

嗯...

currentdb



dbengine(0)(0)


谢谢pietlinden。

嗯...
currentdb

dbengine(0)(0)




pi ******** @ hotmail.com 写在

新闻:11 ***************** *****@g49g2000cwa.googlegr psps.com:

嗯...
currentdb

dbengine(0)(0)


后者在某些情况下可能会失败(在向导运行后立即运行
)。


CurrentDB()。名称永远不会返回除用户界面认为在用户界面中打开的

db名称以外的任何内容。


-

David W. Fenton http://www.bway.net / ~dfenton

dfenton at bway dot net http ://www.bway.net/~dfassoc


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?

解决方案

umm...
currentdb
or
dbengine(0)(0)


Thanks pietlinden.

umm...
currentdb
or
dbengine(0)(0)




pi********@hotmail.com wrote in
news:11**********************@g49g2000cwa.googlegr oups.com:

umm...
currentdb
or
dbengine(0)(0)



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语法...的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆