Subject | Re: [firebird-support] How to hold lock on record |
---|---|
Author | Ann W. Harrison |
Post date | 2004-10-29T16:53:51Z |
At 12:16 PM 10/29/2004, =?ISO-8859-2?Q?Bogus=B3aw_Brandys?= wrote:
with a null number, using an artificial primary key. Commit that.
Then in a single short transaction, generate your document number and
update the document to have the new number. That will requires a
scavenge program that runs from time to time, finding documents without
numbers and asking their creators whether the document is still valid.
Alternately, you can create a number, and store a null document under
that number with enough information to identify the person who created
it and the time of creation. Then you need a scavenge program that
finds numbers without documents.
Regards,
Ann
>Sorry , I didn't mention that this question is related to my previousThe most frequently used solution in this case is to insert a document
>question about unbroken series of document numbers wrapped monthly.
with a null number, using an artificial primary key. Commit that.
Then in a single short transaction, generate your document number and
update the document to have the new number. That will requires a
scavenge program that runs from time to time, finding documents without
numbers and asking their creators whether the document is still valid.
Alternately, you can create a number, and store a null document under
that number with enough information to identify the person who created
it and the time of creation. Then you need a scavenge program that
finds numbers without documents.
Regards,
Ann