RE: [U2] Best practice for Sequential IDs using TRANSACTION START COMMIT/R...

2005-06-17 Thread Bill Haskett
@listserver.u2ug.org Subject: RE: [U2] Best practice for Sequential IDs using TRANSACTION START COMMIT/R... Charles: I'm thinking of instead of a: READVU SeqNo FROM FILENAME.FV, 'CTRL', 1 ELSE SeqNo = 0 . ...test for existence and get the next unique value ...update record WRITEV SeqNo ON FILENAME.FV

RE: [U2] Best practice for Sequential IDs using TRANSACTION START COMMIT/R...

2005-06-16 Thread Bill Haskett
IDs using TRANSACTION START COMMIT/R... From: Bill Haskett I wonder if the same issue (transactions don't release record locks until they're committed) applies to the LOCK/UNLOCK statement? No, those are independent of transactions. So could they be leveraged for the question posed

RE: [U2] Best practice for Sequential IDs using TRANSACTION START COMMIT/R...

2005-06-16 Thread Stevenson, Charles
I don't think that will work, because the WRITEV is still inside the transaction. As a matter of fact, I think it will error out if there is no explicit readu preceding it. That might be isolation-level-dependent, but I don't think so. LOCK 50 READV SeqNo FROM FILENAME.FV, 'CTRL', 1 ELSE

RE: [U2] Best practice for Sequential IDs using TRANSACTION START COMMIT/R...

2005-06-16 Thread Bill Haskett
@listserver.u2ug.org Subject: RE: [U2] Best practice for Sequential IDs using TRANSACTION START COMMIT/R... Charles: I'm thinking of instead of a: READVU SeqNo FROM FILENAME.FV, 'CTRL', 1 ELSE SeqNo = 0 . ...test for existence and get the next unique value ...update record WRITEV SeqNo ON FILENAME.FV

RE: [U2] Best practice for Sequential IDs using TRANSACTION START COMMIT/R...

2005-06-16 Thread Bill Haskett
@listserver.u2ug.org Subject: RE: [U2] Best practice for Sequential IDs using TRANSACTION START COMMIT/R... Charles: I'm thinking of instead of a: READVU SeqNo FROM FILENAME.FV, 'CTRL', 1 ELSE SeqNo = 0 . ...test for existence and get the next unique value ...update record WRITEV SeqNo ON FILENAME.FV

RE: [U2] Best practice for Sequential IDs using TRANSACTION START COMMIT/R...

2005-06-16 Thread Bill Haskett
@listserver.u2ug.org Subject: RE: [U2] Best practice for Sequential IDs using TRANSACTION START COMMIT/R... Charles: I'm thinking of instead of a: READVU SeqNo FROM FILENAME.FV, 'CTRL', 1 ELSE SeqNo = 0 . ...test for existence and get the next unique value ...update record WRITEV SeqNo ON FILENAME.FV

RE: [U2] Best practice for Sequential IDs using TRANSACTION START COMMIT/R...

2005-06-16 Thread Bill Haskett
@listserver.u2ug.org Subject: RE: [U2] Best practice for Sequential IDs using TRANSACTION START COMMIT/R... Charles: I'm thinking of instead of a: READVU SeqNo FROM FILENAME.FV, 'CTRL', 1 ELSE SeqNo = 0 . ...test for existence and get the next unique value ...update record WRITEV SeqNo ON FILENAME.FV

RE: [U2] Best practice for Sequential IDs using TRANSACTION START COMMIT/R...

2005-06-15 Thread Stevenson, Charles
From: Bill Haskett I wonder if the same issue (transactions don't release record locks until they're committed) applies to the LOCK/UNLOCK statement? No, those are independent of transactions. So could they be leveraged for the question posed here? . . . I don't see it. cds --- u2-users

Re: [U2] Best practice for Sequential IDs using TRANSACTION START COMMIT/R...

2005-06-14 Thread CWNoah2
Chuck, I've not worked with transactions, so I may be whizzing in the wind here. Could you call NEXT.AVAIL.ID before TRANSACTION START, and again after the transaction rollback, assuming you can detect if the transaction was rolled back? If the transaction committed, then no further

RE: [U2] Best practice for Sequential IDs using TRANSACTION START COMMIT/R...

2005-06-14 Thread Bill Haskett
AM To: u2-users@listserver.u2ug.org Subject: Re: [U2] Best practice for Sequential IDs using TRANSACTION START COMMIT/R... Chuck, I've not worked with transactions, so I may be whizzing in the wind here. Could you call NEXT.AVAIL.ID before TRANSACTION START, and again after