Subject | Re: [firebird-support] Re: Hundreds of Generators |
---|---|
Author | Venus Software Operations |
Post date | 2010-04-30T11:54:57Z |
Hi LEster
In my reply to Ann which I have copied here, is how I handle the numbers
from having holes.
I have put in code in my app framework which will bring a number from
the generator without incrementing it. At the time of saving if the
number is still valid it will bring that number from the generator again
without incrementing. In case of conflict, where some one (or more) have
taken up numbers since it was shown to the user, the user is then
allowed to use the latest number available or do nothing (essentially
cancel) to the record. If no conflict call the generator once again
allowing it to update. But this is all client side code.
Thanks and regards
Bhavbhuti
In my reply to Ann which I have copied here, is how I handle the numbers
from having holes.
I have put in code in my app framework which will bring a number from
the generator without incrementing it. At the time of saving if the
number is still valid it will bring that number from the generator again
without incrementing. In case of conflict, where some one (or more) have
taken up numbers since it was shown to the user, the user is then
allowed to use the latest number available or do nothing (essentially
cancel) to the record. If no conflict call the generator once again
allowing it to update. But this is all client side code.
Thanks and regards
Bhavbhuti
On 29/04/2010 08:54 pm, Lester Caine wrote:
>
> Ann W. Harrison wrote:
> > Lester Caine wrote:
> >
> >> Using generators for that does sound something of overkill.
> >
> > Aside from the fact that the application might try to create
> > more than 32K of generators, what's the problem? Generators
> > are nearly free in terms of space on disk and much faster to
> > generate than numbers kept in a table.
>
> Hooking up and managing a big array of generators just seems the wrong
> approach.
> And in situations were one does go over 32k items then you have the
> problem of
> how do you cover everything anyway.
>
> Bhavbhuti
> Don't forget that even if you call a value from a generator and then
> don't use
> it for some reason - there will be a hole. At least with a table if yo
> go to add
> something but then abort - perhaps because it was actually the wrong
> product
> when you cross check - then next time you look at that product you
> will see the
> last used batch number, while a generator may be one further on ;)
>
> Everthing has it's plusses and minuses :)
>
> --
> Lester Caine - G8HFL
> -----------------------------
> Contact - http://lsces.co.uk/wiki/?page=contact
> <http://lsces.co.uk/wiki/?page=contact>
> L.S.Caine Electronic Services - http://lsces.co.uk <http://lsces.co.uk>
> EnquirySolve - http://enquirysolve.com/ <http://enquirysolve.com/>
> Model Engineers Digital Workshop - http://medw.co.uk//
> <http://medw.co.uk//>
> Firebird - http://www.firebirdsql.org/index.php
> <http://www.firebirdsql.org/index.php>
>
>
--
Thanking you.
Yours Faithfully,
For Venus Software Operations
----
Bhavbhuti Nathwani
___________________________________________
Softwares for Indian Businesses at: http://venussoftop.tripod.com
venussoftop@...
venussoftop@...
___________________________________________
Please note: We reserve complete rights for policy changes in the future and the same will be applicable immediately as and when made. Attachments may get corrupted before reaching you, in such a situation please let us know and we will resend you the same at the earliest. We do not take any responsibility for data loss of any type and kind. Data safety remains the sole the responsibility of the users of our softwares.
___________________________________________
Internet email confidentiality:
This message may contain information that may be privileged or confidential. If you are not the addressee nor are you responsible for the delivery of the message to the addressee indicated in this email, then you may not copy or deliver this email to anyone and you should notify the sender by reply email and then destroy this message.
Please reply email immediately to this message with REMOVE in the subject, if you or your employer do not consent to email of this kind.
Opinions, conclusions and other information in this message that do not relate to the official business of my firm shall be understood as neither given nor endorsed by my company.