Hi

I am about to embark on using "Transactions" (ie transstart and transend) in my application to maintain database integrity.

I have a question relating to how transactions work, and thought it would be an easy answer rather than me constructing a test.

If I have a routine that updates a file with sequential ids - ie 1000,1001,1002 etc using a parameter which contains the next id no, and there are other routines that are running simultaneously what happens if the routine within the transaction aborts and has to rollback?

For example..

If my next id parameter starts off at 1000. My subroutine within the transaction writes up 3 records, 1000,1001,1002 and moves the parameter to 1003. Meanwhile, whilst the rest of the transaction is processing another process writes a record, moving the parameter to 1004. If the first transaction then aborts what is left in the parameter ? I know that the transactions themselves will disappear.

Many thanks in advance

Regards
Simon

--
=======================================
Simon Verona
Director
Dealer Management Services Ltd
T: 0845 686 2300
========================================


--
IMPORTANT: T24/Globus posts are no longer accepted on this forum.

To post, send email to [email protected]
To unsubscribe, send email to [email protected]
For more options, visit this group at http://groups.google.com/group/jBASE?hl=en

Reply via email to