记录集错误“太多的交易” [英] Recordset error "too many transactions"
问题描述
当几次打开和关闭DAO记录集时,我收到以下错误消息:
When opeing and closing a DAO recordset a few times i get the following error message:
运行时错误''3003'';
无法启动交易;太多的交易已经嵌套了。
Run-time error ''3003'';
Could not start transaction; too many transactions already nested.
我一直在谷歌和论坛调查。我发现的唯一的事情是有关一个错误的微软支持网站的信息,但它似乎只提到ADO记录集。
Microsoft支持网站网页此处和解决方法是这里
然而,当我使用此解决方法时,表示关闭Recordsets的活动状态通过使用 ActiveConnection = Nothing 连接我收到以下错误:
I''ve been google and forum investigating all day. The only thing i have found is information on Microsofts support site regarding a bug but it seems to only mention ADO recordsets.
The Microsoft support site webpage is here and a workaround is here
However when i use this workaround, which states to close the Recordsets''s active connections by using ActiveConnection = Nothing I get the following error:
运行时错误''438'';
对象不支持这个属性或methord
Run-time error ''438'';
Object doesn''t support this property or methord
我正在使用的代码的简化版本是:
A simplised version of the code i''m using is:
推荐答案
看起来Access因为SELECT语句而创建一个循环。
试试吧:
Looks like Access creates a loop because of the SELECT statement.
Try just:
当你使用这样的DAO记录集时,你不应该设置连接。当您指定CurrentDB时,您已经拥有了记录集的源。
但是你应该记得你用记录集完成设置记录集的时间=什么都没有。
Well when your using a DAO recordset like that you should not set the connection. You allready have a source for your recordset when you specified CurrentDB.
You should however remember when your done with your recordset to set the recordset=nothing.
感谢您的回复,
上面的代码是一个剪切下载版本。我的实际选择语句是:
Thanks for the replies,
The code above was a cut down version. My actual select statment is:
这篇关于记录集错误“太多的交易”的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!