问题描述
是否有人发生过这种情况?
Has anyone had this happen?
今天早上这个数据库运行正常。
This database was functioning ok this morning.
今天下午的某个时候,我打开它,点击主菜单上的一个按钮,没有任何反复发生。
Sometime this afternoon, I opened it, clicked on a button on the main menu and nothing happened.
我做了一个小型修理。
再试一次。同样的事情。
Tried again. Same thing.
查看按钮代码。表格中没有代码。一切都消失了。
Looked at the buttons code. No code in the form. All gone.
看了一些其他表格。所有代码都没了。
Looked at some other forms. All code gone.
这是一个主要的数据库,已经使用多年了。所有的代码都消失了,
This is a major database and has been in use for years. All of a suddeb all the code has disappeared,
据我所知,其他所有内容都存在。所有表单,查询和表格。
Everything else is there as far as I can tell. All forms, queries and tables.
我查看了最后几个备份,并且都没有代码,然后当我尝试打开它时,我遇到了显示此消息的备份:
I looked at the last several backups and all had no code then I came across a backup that displays this message when I attempt to open it:
我是不确定这条消息告诉我的是什么。我已经做了备份,肯定会遇到同样的问题。现在它告诉我删除所有模块。我没有看到这有助于我恢复这个数据库。除非我能找到一个好的备份,否则我不知道这是怎么发生的或
如何修复它。
I'm not sure what this message is telling me. I already made a backup which will surely have the same problem. Now it tells me to delete all the modules. I'm not seeing how any of this helps me restore this database. I have no idea how this happened or how to fix it unless I can find a good backup.
我能想到的唯一可能发生的事情就是我试过当数据库位于没有删除权限的文件夹中时压缩数据库。
The only thing I can think of that could have happened is I tried to compact the database when it was in a folder that does not have delete permissions.
推荐答案
1. 在对数据库进行数字签名时过早关闭数据库。 有一段时间,当某个开发人员准备发布时,我们的一个数据库经常*丢失它的代码项目。 链接似乎是开发人员在数字签名过程中输入智能卡凭据之前关闭数据库窗口的
(凭证窗口有时需要一段时间才能弹出,导致开发人员错误地认为签名过程完了)。 这个
几乎总是导致代码项目被完全消灭,当我们的开发人员认识到这一点时,这种形式的腐败几乎停止了。
1. Prematurely closing a database while digitally signing it. For a while one of our databases was *frequently* losing it's code project when a certain developer was preparing it for release. The link seemed to be that the developer was closing the database window before entering smart card credentials during the digital signing process (the credentials window sometimes would take a while to pop up, leading the developer to mistakenly assume that the signing process was complete). This almost always resulted in the code project being completely wiped out, and when our developer recognized this, that form of corruption pretty much stopped.
2。在压缩/维修期间过早关闭数据库。
2. Prematurely closing the database during Compact/Repair.
3. 混合版本的Access / Office共享同一个数据库。 始终建议将数据库前端分发给所有用户的个人计算机,而不是让他们共享FE。 我们最近看到一个旧的.mdb格式
'安装文件'多次丢失它的代码项目。 此文件由生产数据库中的自动更新功能打开,只需将新版本的数据库复制到用户的本地计算机即可。 它位于共享位置,
和许多用户可以同时访问。 多年来,这种设置一直没有遇到麻烦。 最近唯一的变化是,有些用户已将Office 2013推送到他们的计算机,而其他用户仍在使用Office 2010.
修改自动更新代码,将安装文件复制到用户的个人计算机,而不是从共享位置打开*似乎*已经解决了问题。
3. Mixed versions of Access/Office sharing the same database. It is ALWAYS advisable to distribute database front-ends to all users' individual computers rather than having them share a FE. We have recently seen an old .mdb format 'install file' lose it's code project several times. This file is opened by an automatic update feature in a production database, and simply copies new versions of the database to the users' local computers. It is in a shared location and can be accessed by many users simultaneously. This setup has been working without trouble for years. The only recent change has been that SOME users have had Office 2013 pushed to their computers while others are still using Office 2010. Revising the automatic update code to copy the install file to the users' individual computers rather than opening it from a shared location *seems* to have resolved the issue.
在这三种情况中,我肯定99.5%是第一种导致代码项目损坏的原因。 另外两个只是强烈的怀疑。
Out of those three scenarios, I am 99.5 % certain of the first as a cause of code project corruption. The other two are just strong suspicions.
一般建议,不只是代码丢失 -
General advice, not just for code loss -
保持良好的备份,以便您随时准备尽可能恢复。
Keep good backups so that you are prepared to recover to the greatest extent possible at any time.
这篇关于每种形式的所有代码都消失了!的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!