Subject | further understanding of transactions in IBO |
---|---|
Author | Scronkey |
Post date | 2002-09-05T02:09:34Z |
Hi there,
I have just finished reading the chapter on Transactions in the IBO
Getting Started Guide (a good read, and worth the money to anyone
who is considering getting it), but still would like further
clarification.
I'm importing data from a paradox/bde app, using a TIB_Cursor (ibc).
I assign my TIB_Connection to the cursor, then setup a parametrised
query, and cycle through each paradox table record, and call Execute
for the cursor, then move onto the next record, and so on.
Once all records have been imported, I then call ibc.Commit
What I would like to know is should I be using an explicit
transaction to speed things up? I thought this was using an explicit
transaction, until during the import, the routine stops due to an
integrity problem on a unique record, before reaching the end of the
import (i.e. the Commit never gets called) but when I inspect the
table afterwards, all records up to the integrity violation are in
the table.
My understanding was that if it didn't get to the Commit, and
crashed, the commit would never happen.
So I'm assuming that an implicit Commit is being called with every
Execute, and no doubt this has extra overhead.
Is my understanding correct? Should I call StartTransaction
explicitly to gain control?
Thanks for any info.
-Ryan
I have just finished reading the chapter on Transactions in the IBO
Getting Started Guide (a good read, and worth the money to anyone
who is considering getting it), but still would like further
clarification.
I'm importing data from a paradox/bde app, using a TIB_Cursor (ibc).
I assign my TIB_Connection to the cursor, then setup a parametrised
query, and cycle through each paradox table record, and call Execute
for the cursor, then move onto the next record, and so on.
Once all records have been imported, I then call ibc.Commit
What I would like to know is should I be using an explicit
transaction to speed things up? I thought this was using an explicit
transaction, until during the import, the routine stops due to an
integrity problem on a unique record, before reaching the end of the
import (i.e. the Commit never gets called) but when I inspect the
table afterwards, all records up to the integrity violation are in
the table.
My understanding was that if it didn't get to the Commit, and
crashed, the commit would never happen.
So I'm assuming that an implicit Commit is being called with every
Execute, and no doubt this has extra overhead.
Is my understanding correct? Should I call StartTransaction
explicitly to gain control?
Thanks for any info.
-Ryan