database MS Access - 在另一个 Access 数据库中查询的链接

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/17786296/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me): StackOverFlow

提示:将鼠标放在中文语句上可以显示对应的英文。显示中英文
时间:2020-09-08 09:00:57  来源:igfitidea点击:

MS Access - link to query in another Access database

databasems-access

提问by TMS

How can I link query from another MS Access database? I know I can easily link tables, But I don't know how to link queries. The query takes data from many tables which I don't want to link.

如何链接来自另一个 MS Access 数据库的查询?我知道我可以轻松链接表,但我不知道如何链接查询。该查询从我不想链接的许多表中获取数据。

回答by ObieMD5

You can do it this way:

你可以这样做:

SELECT [RemoteQueryname].* FROM [RemoteQueryname] IN 'C:\RemoteDatabase.mdb'

I have tested with databases locally on my machine and runs flawlessly. The only note I would like to point out is before running the query check to make sure the remote databse is closed or it will crash the one trying to do the query.

我已经在我的机器上本地测试了数据库并且运行完美。我想指出的唯一注意事项是在运行查询检查之前确保远程数据库已关闭,否则会导致尝试执行查询的数据库崩溃。

回答by Eric Bartha

The "official" way, by which I assume you mean using the buttons on the ribbon, TMS, would be to use a Make Table Query. Of course, to update the linked data, you would have to run the make table query every time.

我假设您的意思是使用功能区 TMS 上的按钮的“官方”方式是使用制作表查询。当然,要更新链接的数据,您必须每次都运行 make table 查询。