Subject | Transaction error mistery |
---|---|
Author | Marco Menardi |
Post date | 2002-11-07T02:20:58Z |
Ibo 4.2Ia, Firebird 1.01, D6 pro SP2.
Hi, after a lot of troubles, I've isolated this piece of code to show an error that I can't understand.
I've a transaction, trsParametri, with AutoCommit to false, isolation level Committed, and a cursor, crsParamPgm, that uses it.
The first read works well, the second (same code) raises an error at .APIFirst:
"Invalid transaction handler - (Expecting explicit transaction start)".
I can't understand why, since IT IS explicity started.
// this works good
trsParametri.StartTransaction;
crsParamPgm.APIFirst;
crsParamPgm.Close;
trsParametri.Commit;
// now let's do it again...
trsParametri.StartTransaction;
crsParamPgm.APIFirst; // *********** this raises the error
crsParamPgm.Close;
trsParametri.Commit;
what can be wrong?
Thanks a lot
Marco Menardi
Hi, after a lot of troubles, I've isolated this piece of code to show an error that I can't understand.
I've a transaction, trsParametri, with AutoCommit to false, isolation level Committed, and a cursor, crsParamPgm, that uses it.
The first read works well, the second (same code) raises an error at .APIFirst:
"Invalid transaction handler - (Expecting explicit transaction start)".
I can't understand why, since IT IS explicity started.
// this works good
trsParametri.StartTransaction;
crsParamPgm.APIFirst;
crsParamPgm.Close;
trsParametri.Commit;
// now let's do it again...
trsParametri.StartTransaction;
crsParamPgm.APIFirst; // *********** this raises the error
crsParamPgm.Close;
trsParametri.Commit;
what can be wrong?
Thanks a lot
Marco Menardi