Cached Updates on Sybase ASA

I have two Sybase ASA databases.  I am using cached updates to apply updates
to one database and the 'onupdaterecord' event to run another query to
update the second database. What I'm doing is when production is updated in
one database then I update the second database as well.  We run three
shifts/day so in the cached updates there can be up to three production
records for one item.  I update the second database with the cumulative
total produced.  I have a message box after the query to update the second
database that displays the cumulative total.  This amount is correct.
However, when there is more than one production record, sometimes, but not
always, the first production update gets sent to the second database but he
second one does not, even though the message box displays and the update
amount is correct.  It seems like the update to the second database happens
as it should, but then gets rolled back for some reason, but without causing
an error.  This happens sporadically, not all the time, so I have no clue as
to what is really happening.  Does anyone know of any problems with Delphi
and Sybase ASA that could be the problem?  Thanks.