Saving data to Lookup
Laura Brody
laura at hvcomputer.com
Mon Apr 3 09:26:16 PDT 2006
On Mon, 3 Apr 2006 10:31:07 -0500, Shuman, Mike <MSHUMAN at KDA.STATE.KS.US> wrote:
> System: Windows XP Pro
> filePro Ver. 5.0.09DN9
> Situation:
> Input process does lookup into transaction file to obtain
> transaction number. Process adds "1" to transaction
> number and writes it back to lookup file.
> User can break out of input process at any time without
> saving the record currently being keyed. Lookup procedure
> has already incremented and written the next transaction
> number.
> Problem:
> How to make certain that the current record is being saved
> before writing the next transaction number back to the
> lookup file.
Could you do this:
read the transaction number (do not increament) so you have a number
if user breaks out
discard input record
if user saves the record
read the transaction number (locking it)
increment the transaction number
save the input record with the current transaction number
(since other users could have created and saved records
while the current user was halfway through a record when
he went to lunch).
I have heard of other developers who increment at
the begining, and if the user breaks out push the
unused TN back (add a record with the unused number)
on the control file. When you go to get a TN, first
check to see if there are unused TN in the file.
If there are, delete the record and use it. If
there aren't any, just increment the TN.
--
Laura Brody
+------------- Hudson Valley Computer Associates, Inc ----------+
| PO Box 859 120 Sixth Street http://www.hvcomputer.com |
| Verplanck, NY 10596-0859 Voice mail: (914) 739-5004 |
+------ PC repair locally, filePro programming globally --------+
More information about the Filepro-list
mailing list