Icon View Thread

The following is the text of the current message along with any replies.
Messages 1 to 3 of 3 total
Thread Transaction active after commit
Tue, Aug 7 2012 12:54 PMPermanent Link

Uli Becker

Here some sample code to update a value:

Database.StartTransaction;
  try
    dsPatienten.Update;
    dsPatienten.columns ['Vorname'].asString := 'John';
    dsPatienten.Save;
    Database.Commit;
  except
    Database.Rollback;
    Raise;
  end;

Everything works fine, json is sent to my server, I am able to update
the record in the database.
After that however, no request is sent to the server any more - trying
to close the dataset dsPatient results in this error:

"Cannot close the "dsPatienten" dataset while there are still active
transaction operations for the dataset".

Any idea?

Regards Uli
Thu, Aug 9 2012 4:21 AMPermanent Link

Uli Becker

Update:

No idea, why, but the problem doesn't occur any more. Maybe I missed to
send a 200 StatusCode from the server.

Thanks Uli
Thu, Aug 9 2012 12:53 PMPermanent Link

Tim Young [Elevate Software]

Elevate Software, Inc.

Avatar

Email timyoung@elevatesoft.com

Uli,

<< No idea, why, but the problem doesn't occur any more. Maybe I missed to
send a 200 StatusCode from the server. >>

More than likely, yes, that is the issue.  A commit error like this only
triggers the OnCommitError currently, and does not raise an exception.  This
is probably not desirable, though, so I'm going to have the OnCommitError,
OnRollbackError, and OnLoadError events only "eat" the error if an event
handler is defined for the event.  Otherwise, the event handler will be
called, and it is up to you to raise an exception, if you want.

If you have any other questions, please let me know.

Tim Young
Elevate Software
www.elevatesoft.com
Image