Ms-Access 查询会自动删除。 可能是什么原因?
我在 MS-Access 中编写的一些查询会被自动删除。 当我通过代码运行查询时,出现以下错误:
查询应该有一个目标字段
可能的原因是什么?
说明:我在 MS-access 中创建了一个查询。 从代码中运行它。 关闭数据库。 再次启动它,现在对于该特定查询,它显示 'SELECT ;' 仅限。
奇怪的。 我现在处于恐慌模式
BPray 添加:
我在数据库中遇到同样的事情。 这很奇怪,我不确定发生了什么或为什么。 该数据库已经有 5 年多的历史了,而且这种情况最近才开始发生。
数据库似乎从查询中“删除”了 SQL,因此查询本身是“空白”。 查询不会返回空白结果,如果您打开查询设计或 SQL,实际上什么也没有(除了上面提到的“SELECT;”)。
这种情况在这个数据库中已经发生过几次了,而且并不是同一个查询被吹走。 似乎也没有引发该问题的具体操作。
我担心我需要重建这个数据库,但想看看是否有其他人经历过这种情况并知道解决方案。
我们使用的是 32 位版本的 Access,并且使用的是 Office 365。 维修。
任何想法表示赞赏。
Some of the queries I have written inside MS-Access are getting deleted automatically. And while I run the queries through code, I get this error:
Query should have one destination field
What can be the possible reason?
Explanation: I created a query in MS-access. Ran it from the code. Closed the database. Started it again, and now for that particular query, it is showing 'SELECT ;'
only.
Strange. I am in panic mode now
BPray Adding:
I am experiencing the same thing in a database. It is very strange and I am not sure what is happening or why. The database is over 5 years old and this just started happening recently.
The database is seemingly "deleting" the SQL from queries so the query itself is "blank". The query isn't returning blank results, if you open the query design or SQL, there is literally nothing there (other than the 'SELECT;' mentioned above).
This has happened in this database a few times now and it isn't the same query that gets blown away. There also doesn't seem to be a specific action that initiates the problem.
I fear I will need to rebuild this database but wanted to see if anyone else had experienced this and knows of a resolution.
We are using a 32bit version of Access and are on Office 365. I have run a Compact & Repair.
Any thoughts are appreciated.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
检查您的查询在查询设计网格中是否确实有任何字段。 当您在设计视图中打开查询时,您很可能会注意到它没有。
Check if your query actually has any fields in the query design grid. When you open the query in design view, you will most likely notice it doesn't.
当您不运行代码(但仍然关闭并重新打开数据库)时,查询是否会保留?
如果是这样,我会怀疑您的代码中的某些内容正在覆盖查询。
Does the query stick around when you don't run the code (but still close and reopen the database)?
If so, I would suspect that something in your code is overwriting the query.