在执行查询 DoCmd.RunSQL 时出现错误 3340 查询""已损坏 [英] Getting Error 3340 Query ' ' is corrupt while executing queries DoCmd.RunSQL

查看:31
本文介绍了在执行查询 DoCmd.RunSQL 时出现错误 3340 查询""已损坏的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

自从安装

如何成功运行查询?我应该卸载此更新吗?

解决方案

总结

这是一个 已知错误 由 2019 年 11 月 12 日发布的 Office 更新引起.该错误影响 Microsoft 当前支持的所有 Access 版本(从 Access 2010 到 365).

此错误已修复.

  • 如果您使用 C2R(即点即用)版本的 Office,使用立即更新":
    • Access 2010 C2R:在 Build 7243.5000 中修复
    • Access 2013 C2R:在 Build 5197.1000 中修复
    • Access 2016 C2R:在 Build 12130.20390 中修复
    • Access 2019 (v1910):在 Build 12130.20390 中修复
    • Access 2019(批量许可):在 Build 10353.20037 中修复
    • Office 365 每月频道:在 Build 12130.20390 中修复
    • Office 365 半年版:已在内部版本 11328.20480 中修复
    • Office 365 半年扩展版:已在内部版本 10730.20422 中修复
    • Office 365 半年目标:在 Build 11929.20494 中修复
  • 如果您使用 MSI 版本的 Office,请安装与您的 Office 版本匹配的更新.所有这些补丁都已在 Microsoft Update 上发布,因此 安装所有待定的 Windows 更新 应该足够了:
<小时>

示例

这是一个最小的重现示例:

  1. 创建一个新的 Access 数据库.
  2. 使用默认 ID 字段和长整数字段myint"创建一个新的空表Table1".
  3. 在 VBA 编辑器的立即窗口中执行以下代码:

    CurrentDb.Execute "UPDATE Table1 SET myint = 1 WHERE myint = 1"

预期结果:语句成功完成.

实际结果安装了其中一个有问题的更新:发生运行时错误 3340(查询 '' 已损坏").

<小时>

相关链接:

Since installing the windows update for Office 2010 resolving KB 4484127 I get an error while executing queries which contain a WHERE clause.

For example executing this query:

DoCmd.RunSQL "update users set uname= 'bob' where usercode=1"

Results in this error:

Error number = 3340 Query ' ' is corrupt

The update in question is currently still installed:

How can I successfully run my queries? Should I just uninstall this update?

解决方案

Summary

This is a known bug caused by the Office updates released on November 12, 2019. The bug affects all versions of Access currently supported by Microsoft (from Access 2010 to 365).

This bug has been fixed.

  • If you use a C2R (Click-to-Run) version of Office, use "Update now":
    • Access 2010 C2R: Fixed in Build 7243.5000
    • Access 2013 C2R: Fixed in Build 5197.1000
    • Access 2016 C2R: Fixed in Build 12130.20390
    • Access 2019 (v1910): Fixed in Build 12130.20390
    • Access 2019 (Volume License): Fixed in Build 10353.20037
    • Office 365 Monthly Channel: Fixed in Build 12130.20390
    • Office 365 Semi-Annual: Fixed in Build 11328.20480
    • Office 365 Semi-Annual Extended: Fixed in Build 10730.20422
    • Office 365 Semi-Annual Targeted: Fixed in Build 11929.20494
  • If you use an MSI version of Office, install the update matching your Office version. All of these patches have been released on Microsoft Update, so installing all pending Windows Updates should suffice:

Example

Here is a minimal repro example:

  1. Create a new Access database.
  2. Create a new, empty table "Table1" with the default ID field and a Long Integer field "myint".
  3. Execute the following code in the VBA editor's Immediate Window:

    CurrentDb.Execute "UPDATE Table1 SET myint = 1 WHERE myint = 1"

Expected result: The statement successfully finishes.

Actual result with one of the buggy updates installed: Run-time error 3340 occurs ("Query '' is corrupt").


Related links:

这篇关于在执行查询 DoCmd.RunSQL 时出现错误 3340 查询""已损坏的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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