简体   繁体   English

在Windows 8和Delphi XE3上使用SQL Server的ADO中,什么会导致“游标操作冲突”错误?

[英]What would cause “Cursor Operation Conflict” error in ADO with SQL Server on Windows 8 and Delphi XE3?

I'm using Embarcadero Delphi XE3 on Windows 8 and I'm trying to connect with SQL Server 2000. 我在Windows 8上使用Embarcadero Delphi XE3,并且尝试与SQL Server 2000连接。

My program used to work correctly when I was using Delphi 2007 on Windows 7, but now whenever I do transaction (Update, Insert, Delete) it gives me an error message saying "Cursor Operation Conflict" and continue working (commit the transaction). 当我在Windows 7上使用Delphi 2007时,我的程序曾经可以正常工作,但是现在无论何时进行事务处理(更新,插入,删除),它都会给我一条错误消息,提示"Cursor Operation Conflict"并继续工作(提交事务)。

I'm using TADOConnection to connect with the server and I use TADODataSet to do transactions. 我正在使用TADOConnection与服务器连接,并且我使用TADODataSet进行事务。 I use TADODataSet.Insert / TADODataSet.Edit / TADODataSet.Post / TADODataSet.Delete to do the transactions. 我使用TADODataSet.Insert / TADODataSet.Edit / TADODataSet.Post / TADODataSet.Delete进行事务。

I couldn't post any piece from the code because it is general problem. 我无法从代码中发布任何内容,因为这是普遍问题。

I would like to know what may cause this error to be able to debug my code and make sure that I'm not doing any wrong.... 我想知道什么可能导致此错误,从而能够调试我的代码并确保我没有做任何错误....

The error only appears when I use clUseServer in TADODataSet.CursorLocation property. 仅当我在TADODataSet.CursorLocation属性中使用clUseServer时,才会出现该错误。

i had the same error with some VB6 code, it even happened when i used a disconnected adodb.recordset 我对某些VB6代码有相同的错误,甚至在我使用断开连接的adodb.recordset时也发生了

my solution was to create an entirely separate connection (to the same server) for my record set which seemed to resolve my issue 我的解决方案是为记录集创建一个完全独立的连接(到同一服务器),这似乎解决了我的问题

i don't know much about delphi but i thought it could possibly help 我对Delphi不太了解,但我认为这可能会有所帮助

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM