拆分数据库前端后端 [英] Split database front end back end

查看:115
本文介绍了拆分数据库前端后端的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我拆分了数据库,所以有一个前端和后端。现在我的问题是,如果用户决定将应用程序安装在与C不同的驱动器上,那么数据库后端显示的是VBA处理这种情况的方法吗?

谢谢

I''ve split my database so have a front end and back end. Now my question is if a user decides to install the application on a different drive than C: which is where the back end of the database shows is the a way in VBA to take care of the situation?
Thanks

推荐答案

根据你的情况,有很多不同的方法可以做到这一点。这些事件中的每一个都将由在启动时在后台加载的表单触发,并检查到后端表的断开链接。


1)如果前端和后端将总是相对于彼此定位,您可以使用VBA获取前端的路径并附加所需的额外路径并使用它来重新链接您的表格。


2)如果无法知道前端相对于后端的位置,可以让他们通过使用VBA拉出文件选择器并使用该位置重新链接表来手动选择位置。


就像我说的,还有很多其他方法可以做到这一点,但这是最简单的两个。
There are a number of different ways to do this, depending on your scenario. Each of these events would be triggered by a form that loads in the background at startup and checks for broken links to the back end tables.

1) If the front end and back end will always be positioned relative to each other, you can use VBA to get the path of the front end and append whatever extra path needed from there and use that to relink your tables.

2) If there is no way to know where they will place the front end in relation to the back end, you can have them manually select the location by using VBA to pull up the file picker and use that location to relink your tables.

Like I said, there are plenty of other ways to do this, but these are two of the simplest.


感谢您的快速回复。我喜欢选项1,但不知道如何做到这一点。你有一些我可以做到这一点的例子吗。
Thanks for the quick reply. I like the option 1 but have no idea how to do this. Do you have some examples of how I can accomplish this.


我使用的一种方法(我在这里描述的有点复杂)是这个。


在FRONT End中,创建一个表,其中包含将使用该程序的所有计算机名称以及BE数据库的相应路径。


此函数将给出当前计算机的名称。

An approach that I use (It''s a bit more complicated that what I shall describe here) is this.

In the FRONT End, create a table that has all the computer names that will use the program and the corresponding paths to the BE databases.

This function will give the name of the current computer.

展开 | 选择 | Wrap | 行号


这篇关于拆分数据库前端后端的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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