Not what you asked but... We use transaction boundaries for some updates with varying degrees of success, and we turn transaction logging off on files that contain next numbers. We also keep a pool of returned numbers in a second parameter in each next number record, and the next number routine recycles those before incrementing the main number. We also use our own locking scheme(a holdover from the old group lock days) and we don't release locks on records written within the boundaries (the next number being the exception) until after we hit either transend or transabort.
-----Original Message----- From: [email protected] [mailto:[email protected]] On Behalf Of Simon Verona Sent: Friday, May 04, 2012 3:11 AM To: jBASE Subject: Transactions 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 -- 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
