简体   繁体   English

ms-access:双链接表

[英]ms-access: double linked table

i have an ms-access backend 我有一个ms-access后端

i have a bunch of users connecting to the back end with their own personal front ends 我有一堆用户使用自己的个人前端连接到后端

i am changing the backend to sql server, and do not want to re-distribute front ends. 我正在将后端更改为sql server,并且不想重新分配前端。 is it possible for me to just set it up so that the ms-access backend points to the sql-server? 是否有可能我将其设置为使ms-access后端指向sql-server?

please note that all i need is just one table. 请注意,我只需要一张桌子。 it would be access-frontend-->ms-access back end-->sql server table 它应该是access-frontend-> ms-access backend-> sql server table

Yes. 是。 Create a linked table with an ODBC connection to the SQL Server. 创建具有到SQL Server的ODBC连接的链接表。 Then each of your clients will need the same ODBC connection added to their PCs. 然后,每个客户端都需要将相同的ODBC连接添加到其PC。

I created a database, BE.mdb, which contains a single table, Books. 我创建了一个数据库BE.mdb,其中包含一个表Books。

Next I created another database, FE.mdb, which contains a link to the Books table in BE.mdb 接下来,我创建了另一个数据库FE.mdb,其中包含指向BE.mdb中的Books表的链接。

Then, I opened BE.mdb and replaced Books with an ODBC link to a table in a PostGreSQL database. 然后,我打开BE.mdb,并用到PostGreSQL数据库中表的ODBC链接替换了Books。

Does that description correspond to what you want to accomplish? 该描述是否与您要完成的工作相对应?

If so, I don't see how it can work because when I open FE.mdb again and try to open the Books linked table, Access complains "The Microsoft Jet database engine cannot find the input table or query 'Books'". 如果是这样,我看不到它如何工作,因为当我再次打开FE.mdb并尝试打开Books链接表时,Access抱怨“ Microsoft Jet数据库引擎找不到输入表或查询'Books'”。

I think Access' database engine is looking for a native Jet table (or query) named Books ... which is what existed when the link was created. 我认为Access的数据库引擎正在寻找一个名为Books的本地Jet表(或查询)……这是创建链接时存在的内容。 However, the Books link target was changed from a Jet table to an ODBC link, so the Jet database engine can't find what it is looking for. 但是,Books链接目标已从Jet表更改为ODBC链接,因此Jet数据库引擎找不到所需的内容。

The only way I can find to make it work is to change the link definition in FE.mdb ... but I thought that's what you wanted to avoid. 我能找到使它起作用的唯一方法是更改​​FE.mdb中的链接定义...但我认为这就是您要避免的事情。

It is possible, I did it myself but for different reasons. 有可能,我自己做了,但是出于不同的原因。 It was a stop gap while half the applications in a group were migrated and half stayed on access for a few months but we still needed to run reports that spanned both applications. 这是一个停顿的间隙,一组中一半的应用程序已迁移,一半的应用程序可以访问几个月,但是我们仍然需要运行涵盖两个应用程序的报告。

I will say that there was a marked performance hit using this method and I would echo the recommendation of using the excellent access auto FE updater to ease this kind of issue in the future 我会说使用这种方法会显着降低性能,并且我会推荐使用出色的访问自动FE更新程序来缓解此类问题的建议

Sure HansUp, it might be a bit of an edge case but this is my situation. 当然,HansUp可能有点不合常规,但这是我的情况。

I had a number of back end MDB files for a group of applications, I needed to have all of this information in one database so I could do reporting using business objects that needs all of the tables under one “connection” (in this case the connection is to this MDB that just has linked tables to the real back ends). 我为一组应用程序提供了许多后端MDB文件,我需要将所有这些信息存储在一个数据库中,以便可以使用需要在一个“连接”下使用所有表的业务对象来进行报告(在这种情况下,连接到该MDB,该MDB只是将表链接到实际的后端)。

Some of these applications got migrated to SQL server before others including some common shared tables. 其中一些应用程序先于其他常见的共享表迁移到了SQL Server。 In some situations the chain went Front End -> Back End -> SQL server. 在某些情况下,链会进入前端->后端-> SQL服务器。 It does take a performance hit and I'm much happier now that the migration is fully complete. 确实会影响性能,现在迁移完全完成了,我感到非常高兴。

Oh and I don't link using DSNs I use a DSN-less setup with a bit of code to re point the tables to different serves for testing/production 哦,我没有使用DSN进行链接,我使用了无DSN的设置以及一些代码来将表重新指向不同的服务进行测试/生产

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM