将链接表的绝对路径更改为相对路径

发布于 2024-12-26 09:44:38 字数 70 浏览 10 评论 0原文

如何在 MS Access 2003 中执行上述操作?我有很多带有绝对路径的链接表,我想删除所有路径的目录部分以引用当前目录。

How do I do the above in MS Access 2003? I have a lot of linked tables with absolute paths, I want to remove the directory part of all paths to refer to current directory.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

何以笙箫默 2025-01-02 09:44:38

您不能使用链接表来寻址相对地址。

但是,如果我在同一目录中有前端+后端,那么在启动时我总是检查链接是否正常,如果没有,代码将假定当前目录并尝试重新链接。因此,这意味着他们可以移动文件夹,并且最终相对寻址成为一个有争议的问题,因为如果他们重新命名文件夹或移动它,应用程序就可以工作。

上述方法有效,并且仅对非多用户设置有意义。对于多用户,每个用户都将拥有前端的副本(您不希望多个用户位于同一前端)。由于该前端将位于每个桌面上,因此您无论如何都不能在服务器端假设或拥有任何类型的相对寻址。

因此,最终,不支持相对寻址,但正如您在使用此类寻址的情况下所指出的,您只需重新链接代码即可。因此,您始终可以提取 Access 的完整路径名,并且始终可以检查当前路径上方或下方是否存在目录,并在需要时重新链接。

在链接到某些服务器文件夹的情况下,这样的寻址实际上没有任何意义,因此您无论如何都不会错过此功能。

You cannot address relative with link tables.

However, in the case where I have a front end + back end in the same directory, then on startup I always check if the link is ok, if not, the code assumes the current dir and attempts to re-link. So this means that they can move the folder and that the end of the day relative addressing becomes a moot point since the application works if they ren-name the folder or move it.

The above works and ONLY makes sense for a non multi-user setup. For multi-user each user going to have a copy of the front end (you don't want multiple users in the same front end). Since that front end would be on each desktop and then you cannot assume or have any kind of relative addressing on the server side anyway.

So at the end of the day, relative addressing is not supported, but as pointed out in the cases(s) where you would use such addressing, you can simply have your code re-link. So you can always pull the full path name of Access, and you can always check for a existence of a dir above or below the current path and re-link if need be.

In the cases of linking to some server folder, then such addressing would not really make sense anyway and thus you are not likely going to miss this ability anyway.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文