避免消息“找不到文件... database_path” [英] Avoid message "Could not find file... database_path"

查看:126
本文介绍了避免消息“找不到文件... database_path”的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

您好!


无法找到文件... database_path

如果前端数据库找不到后端,则会显示此消息数据库。


我将表单设置为StartUp表单。我尝试将代码放入相关事件(On_Load和On_Open)来拦截错误,但似乎在该消息出现之前没有代码运行。


是否可以治疗这个错误?简单我希望显示一条消息,例如请将您的界面重新连接到数据库,请而是默认的消息。


谢谢!

Hello !

"Could not find file... database_path"
This message appear if a front end database could not find the back end database.

I have a form set as StartUp form. I try to put code in associated events (On_Load and On_Open) to intercept the error but it seems that no code is running either before either after that message appear.

Is it possible to treat this error ? Simple I wish to show a message like "Reconnect your interface to the database, please" instead the default message.

Thank you !

推荐答案

从那以后我已经有一段时间了。

是否有号码?
Its been a while since I''ve since this error.
Does it have a number?


没有。它不是一个数字。它只是一条消息。


更改后端数据库(您有表的地方)的名称,然后尝试根据此表打开前端。你会看到这条消息。


当然,如果你恢复旧的名字,一切都还好。

据我所知,这是一个来自数据库引擎的消息(JET ???)。

问题是:可以拦截以运行代码来处理这个错误吗?


谢谢感谢您,Smiley!
No. It hasn''t a number. It is only a message.

Change the name for a back end database (where you have tables) then try to open a front end based on this tables. You will see the message.

Of course, if you restore the old name all is Ok again.
As far as I can think, that is a message from the database engine (JET ???).
The question is: can be intercepted in order to run code to handle this error ?

Thank you for interest, Smiley !


在我的测试中,只有在尝试访问其中一个链接表时才会触发此错误消息。我怀疑你有自动运行的东西,包括这样的访问。


你应该尝试将其作为代码的第一步。 使用VBA重新链接ODBC表应具备您需要的所有信息,但如果您需要任何解释,请告诉我们。
In my tests this error message is only triggered when an access is attempted to one of the linked tables. I suspect you have something running automatically that includes such an access.

You should try checking this as a first step in your code. Relinking ODBC Tables using VBA should have all the information you need for this, but let us know if you need anything explained.


这篇关于避免消息“找不到文件... database_path”的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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