这次您无权访问数据库。如果您继续进行更改,稍后可能无法保存它们

发布于 2024-12-11 03:42:27 字数 104 浏览 0 评论 0原文

我是 MS Access 的新手。现在我必须在 ms access 2003 中完成一些修改。我收到此错误“您这次无权访问数据库。如果您继续进行更改,以后可能无法保存它们”。请帮我解决这个问题。

i am new in ms access. Now i have to finish some modifications in ms access 2003. I am getting this error "you do not have access to the database this time. If you proceed to make changes,you may not be able to save them later". Please help me to solve this problem.

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

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

发布评论

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

评论(4

巴黎夜雨 2024-12-18 03:42:27

Microsoft 有 记录了该问题,但建议的解决方案在我的大多数情况下完全无法使用。此外,即使在拆分数据库中也会出现此问题,并且与使用代码的表单和控件不一致。在我看来,微软在这一点上犯了错误,或者至少记录不完整。

这是我的解决方案:
许多情况下的问题都可以追溯到 Access 认为数据库处于独占模式,而实际上它应该处于共享模式。在“选项”下将数据库设置为“共享模式”并没有帮助,因为每当用户打开数据库中任何对象的“设计视图”或进行代码修改或用户按“保存”(CTRL + S)!

为了防止弹出错误消息,您需要防止用户在数据库中按“保存”或切换到“设计视图”。我已经删除了快速访问中的保存按钮工具栏(因此用户看不到它),在“选项”>“当前数据库”下,我未选中“允许完整菜单”。此外,您还可以在同一菜单中取消选中“启用布局视图”。

也许可以完全禁用“保存”功能,但我还没有为此编写代码。这个解决方案并不是万无一失的,但它大大减少了我的各种拆分和未拆分数据库中问题的发生。

Microsoft has documented the problem, but the sugested solutions were completly unusable in most of my situations. Furthermore the issue occurs even in a split database and it occurrs inconsistently with forms and controls that use code. In my opinion MS got this wrong or at the very least documented incompletly.

Here is my solution:
The problem in many instances traces back to Access thinking the DB is in an exclusive mode, when it should be in a shared mode. Setting the DB to "shared mode" under Options doesn't help, because it will revert back to "exclusive" any time a user turns on the "design view" for any object in the database OR makes code modifications OR if a user presses "save" (CTRL + S)!

In order to prevent the error message from poping up, you need to prevent the users from pressing "save" or switching to "design view" in your DB. I have deleted the save button in the Quick Access Toolbar (so users don't see it) and under Options>Current Database I have unchecked "Allow Full Menus". Additionally you can also uncheck "Enable Layout View" in the same menu.

Possibly the Save function can be disabled alltogether, but I have not yet written code for this. This solution is not fool proof, but it greatly reduced the occurence of the problem in my various split and unsplit DBs.

落墨 2024-12-18 03:42:27

前几天我在 ms-access-2010 中收到此错误。我正在使用 vb 中的方法来查询数据库。在方法结束时完成事务后,我需要提交事务并关闭数据库对象。这解决了我的问题。

I was getting this error in ms-access-2010 just the other day. I was working with a method in vb to query the db. I needed to commit my transactions and close the database object after I was done with it at the end of the method. This fixed the problem for me.

云醉月微眠 2024-12-18 03:42:27

当您不是 .mdw(安全)文件中存在的唯一实时用户时,在 Access 03 中会发生这种情况,如果这是共享数据库,则在进行任何更改之前,您将需要所有其他用户注销,然后确保此错误不会发生不会再次发生,请始终以“独占”模式打开数据库进行编辑,这是通过选择打开按钮上的小箭头来实现的。

但是,您也可能对 .mdw 文件有一些奇怪的行为,如果您确实是唯一登录的用户,那么我建议首先注销,手动删除 .mdw 文件(如果存在),然后返回数据库。

This occurs in Access 03 when you are not the only live user present in the .mdw (security) file, if this is a shared database then before making any changes you will need all other users to log out and then to ensure this error doesn't occur again, always open the database in 'exclusive' mode for editing, this is achieved by selecting the little arrow on the open button.

However, you can also have some strange behaviour with .mdw files, if you are genuinely the only user logged in, then I would suggest first logging out, manually deleting the .mdw file if it exists and then going back into the database.

烟酉 2024-12-18 03:42:27

编程时始终以“独占模式”打开数据库,这种情况永远不会发生。

Always open the database in "exclusive mode" when programming and this will never happen.

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