Monday, March 19, 2012

[SQLCE Mobile]Do Select during Transaction

Hi,

I need to do a Select and after a Insert during a Transaction. But when i want to commit this transaction i've the following error message :

The transaction can not be committed if there are any opened cursors in the scope of this transaction. Make sure all data readers / result sets are explicitly closed before committing the change.

I don't understand this error message. How can i close my cursors.

Before my Insert i'm closing my SqlCeDataReader and i dispose it. My SqlCeCommand are also closed and dispose.

Do you have any ID?

Thanks.

Hi Kardath,

I tried to repro this here and could not reproduce the problem. I am able to have both INSERT and SELECT in a single transaction. Can you please try to dispose the all the sqlce objects and see if the problem disappers?

Thanks,

Laxmi

No comments:

Post a Comment