Lookups in input processing

Kenneth Brody kenbrody at bestweb.net
Wed Feb 2 12:33:11 PST 2005


Mitch Theophila/MGT Computer Solutions wrote:
[...]
> but if i were to add to their invoice file input processing a new lookup to
> examine other records in their invoice file, wouldn't such a lookup move the
> "current record pointer" away from the new record being created?  in such a
> case, wouldn't the data for the "new" invoice overwrite whatever record was
> currently "current"?
> 
> perhaps fP handles this automatically, as it does so much else, but i'm
> familiar with lots of other database packages where it isn't .. in other
> words, i'm wondering whether fP requires the input process table to "remember
> the location" of the record being created, and "re-establish that location"
> when the changes are ready to be committed.
[...]

Each lookup has its own record pointer.  A lookup back to the main file
will not affect the record you are sitting on.  (Unless, of course, you
do a lookup dash.)

So, if you are on record 1 in a file called "mainfile" and have the
following code:

    lookup two=mainfile r=("2") -nx
    lookup three=mainfile r=("3") -nx
    lookup four=mainfile r=("4") -nx
    mesgbox @rn < two[@rn] < three[@rn] < four[@rn]

you will still be on record 1, and each of the lookups will be on the
corresponding record number used for that lookup.

-- 
+-------------------------+--------------------+-----------------------------+
| Kenneth J. Brody        | www.hvcomputer.com |                             |
| kenbrody/at\spamcop.net | www.fptech.com     | #include <std_disclaimer.h> |
+-------------------------+--------------------+-----------------------------+
Don't e-mail me at: <mailto:ThisIsASpamTrap at gmail.com>



More information about the Filepro-list mailing list