Saving data to Lookup

John Esak john at valar.com
Mon Apr 3 15:12:47 PDT 2006


	>
> > Problem:
> >
> > How to make certain that the current record is being saved
> > before writing the next transaction number back to the
> > lookup file.
> [...]
>
> Don't assign the transaction number until you are ready to save the
> transaction.
>
> --
> KenBrody at BestWeb dot net        spamtrap: <g8ymh8uf001 at sneakemail.com>

Or, do what Lura suggested.  In the very few cases where I must keep a
number in sequence...usually for banks... yeccchhhh...  First, I wait until
I am ready to assign the trx number and then do so... use it to post to all
sorts of trx records, etc. Now, if theuser decides *after* this point that
he wants to throw away the record, just go out and back out all the
transactions, then put that *used* trx number in a control file full of
unused trx numbers. Whenever any trx number is required, first check if
there are any of these *unused* trx numbers in that file... if so, grab one
and delete it from the file. In this way, the unused trx numbers do
eventually get used, and there will be no gaps in the sequence.

I must say, though, needing to keep this kind of sequential numbering should
someday soon become a thing of the past... who cares? At worst case, you
could even store unwanted trx numbers with a "reason" like "Void" or
whatever and just never use them again.  I prefer never to show
unused/unwantted trx numbers. What's there is there, what isn't, isn't. If
these were checks on the top of a stack of unused checks it would be a
different matter. :-) In this case, you would want to know exactly where
each one went.  This is why we buy our checks *without* sequential nubmers
and print them ourselves. It makes bank recs hard though since the banks use
this check number... so the final answer for checks is to use the microtoner
magnetic junk and print the bank numbers also. Way too much trouble for us,
though.

JE




More information about the Filepro-list mailing list