错误3211 - 数据库引擎无法锁定表'< tablename>'.....但< tablename>是空白的 [英] Error 3211 - The database engine could not lock table '<tablename>' .....but <tablename> is blank

查看:177
本文介绍了错误3211 - 数据库引擎无法锁定表'< tablename>'.....但< tablename>是空白的的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我们一直在现有数据库中进行一些Forms开发以扩展其功能,我们一直在几个开发人员之间传递数据库,其中一个开发人员在做CM(几乎全部复制和粘贴)新的东西,所以让一个人
处理工作正常)。最后一次更新是在一周前。

We've been doing some Forms development in an existing database to extend its capability and we've been passing around the database between a couple of developers with one of them doing the CM (its almost all copy and paste of new stuff, so letting one person handle is working fine). The last update was a week ago.

今天我们尝试将新查询复制(并粘贴)到master数据库,我们收到3211错误(数据库引擎无法锁定表''因为它已经被其他人或进程使用了​​。) 问题是表名是空白的......它是
字面上的''。  锁定了什么?

Today we tried to copy (and paste) a new query over to the master database and we got a 3211 error (The database engine could not lock table '' because it is already in use by another person or process.)  The problem is that the table name is blank...it literally states ''.  What is locked?

以下是我们迄今为止修复/测试问题所做的工作(注意:所有表单,查询,表格和模块在复制时都已关闭尝试粘贴。)

Here's what we've done so far to fix/test the problem (note: All forms, queries, tables, and modules are closed when the copy and paste is attempted.)

1。我们创建了一个空数据库,并尝试将源数据库中的一个表对象复制并粘贴到其中。仍然得到错误。 (这证实了它不是目的地数据库......我们怀疑这个,但这几乎可以解决它)

1. We created an empty database and tried to copy and paste one table object from the source database into it. Still get the error. (this confirms its not the destination database...we suspected this, but this pretty much clinches it)

2。我们尝试以独占模式打开源数据库并进行复制和粘贴。仍然得到错误。

2. We tried opening the source database in exclusive mode and do the copy and paste. Still get the error.

3。我们做了紧凑和修理。仍然得到错误。

3. We did a compact and repair. Still get the error.

4。我们试图反编译代码"/ decomp"打开(打开所有VBA)。仍然得到错误。

4. We tried to decompile the code "/decomp" switch on open (which decompiles all the VBA). Still get the error.

5。我们在新代码中找到了一个地方,我们没有做db.close和Set recordset = Nothing并修复,反编译,重新编译,紧凑和修复。仍然得到错误。

5. We found one place in the new code where we did not do a db.close and Set recordset = Nothing and fixed it, decompiled, recompiled, with a compact and repair. Still get the error.

我们处于亏损状态......数据库陷入困境,认为记录被锁定并且正在使用但它不提供表名。有没有办法重置master数据库表锁标志?

We're at a loss...the database is stuck thinking a record is locked and in use but it does not provide a table name. Is there a way to reset the master database table lock flag?




推荐答案

嗨Demelgry,

根据错误消息,似乎另一个用户当前正在使用的表必须被锁定。基于Point 2,似乎只有你使用这个源数据库,对吗?要检查它是否与您的特殊源数据库相关,
我建议您创建两个新数据库,然后重新测试。

>>今天我们尝试将新查询复制(并粘贴)到主数据库

您是如何手动复制和粘贴的还是按代码?基于您的Point 5,您似乎正在使用代码。如果您可以分享我们的代码或详细步骤来重现您的问题,将会很有帮助。

最诚挚的问候,

爱德华


这篇关于错误3211 - 数据库引擎无法锁定表'< tablename>'.....但< tablename>是空白的的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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