Q:
When I use the transactions ,I\'ll get the following error on about 1 out of every 100 record.
This IfxTransaction has completed; it is no lo
You seem to be handling errors and rolling back the transaction in two places (in Execute_NonQueryWithTransaction
and in InsertGroups
.
And the return from Execute_NonQueryWithTransaction
is used both to return error codes and to return rows affected. But in InsertGroups
it is checked purely as a rows affected.
Could you have an error code from Execute_NonQueryWithTransaction
(so transaction rolled back) being treated as success (rows inserted) in InsertGroups
and the commit then fails?
Overall the code needs significant cleanup: