Subject | Re: [firebird-support] Unbroken series of numbers |
---|---|
Author | Bogusław Brandys |
Post date | 2004-10-28T05:46:52Z |
Ann W. Harrison wrote:
be only hidden but not really delete (for audit purpose)
conflict when updating this value.Today these are only tests, but with
100 or more users using the same database over rather slow 128 kb/s ADSL
,this probably will going to be a problem.
sequences does not mention how to use generators for audible series of
numbers but with limited period (if it's possible).
Is resetting generators when new month starts not dangerous ?
Best Regards
Bogusław Brandys
> At 03:55 PM 10/27/2004, =?ISO-8859-2?Q?Bogus=B3aw_Brandys?= wrote:Yes,I must be sure that no hole exists ;-) Even delete documents should
>
>
>>Hello,
>>
>>I'd like to know how in Firebird is possible to have unbroken series of
>>for example document's numbers but wrapped monthly for example.
>>1\01\2004
>>2\01\2004
>>3\01\2004
>>...
>>1\02\2004
>>2\02\2004
>
>
> The answer depends somewhat on how many documents you expect to store
> and whether you need to be absolutely certain that you never get a hole
> in the sequence.
be only hidden but not really delete (for audit purpose)
> If the answer that holes are OK, then use a generator and resetI wish I can use this solution,but probably I coudn't.
> it monthly.
> If the answer is a few, and holes are not OK, then setup a tableThis is what I do currently, but I wish to avoid deadlock or lock
> that contains only the next number. Reset the number monthly.
> Increment the value by updating the record that holds it before
> storing the document. If your transaction rolls back, the number
> becomes available again.
conflict when updating this value.Today these are only tests, but with
100 or more users using the same database over rather slow 128 kb/s ADSL
,this probably will going to be a problem.
> If the answer is a lot and holes are not OK, then you've got aThat's I'm looking for , but unfortunately article about audible
> problem and should look at the "auditable sequences" answers.
sequences does not mention how to use generators for audible series of
numbers but with limited period (if it's possible).
Is resetting generators when new month starts not dangerous ?
Best Regards
Bogusław Brandys