Problem with Update trigger and transaction



We are currently re-writting some code that wraps around a system that is Fox
5 that we do not own the code for ( eek ). The problem stems from an update
that needs to be done on an order table. The update merely indicates the qty
of pieces that have shipped on the packer we are creating.

We begin by using begin trans. The mentality is it all must go in, or it
all must rollback at one time. Parital updates to some tables and not others
would be a bad thing. After the begin trans we insert a packing slip header
record in its table. We then proceed to process all the detail records by
updating the order information and inserting the packer detail rows as we go
through. All of this is wrapped in the transaction we started in the
beginning. If one items fails we bailout and rollback.

The problem is when the order update occurs a trigger fires to record the
old values. This causes a 1598 error which basically is transactions out of
balance to occur. It would be nice if the trigger would fire when the commit
occurs basically when data is actually written to disk. The only way I see
to solve the issue is to not use transactions.

Anybody have a solution or some words of wisdom?
.



Relevant Pages

  • RE: Problem with Update trigger and transaction
    ... > updating the order information and inserting the packer detail rows as we go ... All of this is wrapped in the transaction we started in the ... If one items fails we bailout and rollback. ... > The problem is when the order update occurs a trigger fires to record the ...
    (microsoft.public.fox.vfp.dbc)
  • Re: Unit of work and Service dealing with XDocument
    ... transactions. ... public void Commit() { ... public void Rollback() { ...
    (microsoft.public.dotnet.languages.csharp)
  • Re: Number of open transactions in DAO
    ... The idea behind transactions is to ensure that all updates across multiple tables in a database can succeed prior to committing them. ... I commit when the user presses the save button (which will also add more info to the records in the recordset) and rollback on the form's OnClose event. ... I need this for cleaning up but calling .Rollback or .CommitTrans when there is no transaction causes a runtime error. ...
    (microsoft.public.access.modulesdaovba)
  • Re: OO programming - illumination?
    ... > Commits and rollbacks are an artifact of a particular storage ... > that the problem solution should not have to understand. ... In distributed transactions, multiple resources can ... > such thing as a rollback. ...
    (comp.object)
  • Re: ADOBD / JET Transaction Problems
    ... I think it's probably more relevant to post the transaction-related code ... > using ADODB to open the database to use record level locking. ... > Rollback, the Rollback does not Rollback the transactions - all 3 are ...
    (microsoft.public.data.ado)

Quantcast