Retro video games delivered to your door every month!
Click above to get retro games delivered to your door ever month!
X-Hacker.org- Artful Two for Clipper 5.0 - Norton Guide http://www.X-Hacker.org [<<Previous Entry] [^^Up^^] [Next Entry>>] [Menu] [About The Guide]

Syntax

FETCH( pTarget, cAlias, cField ;
       [, nIndexord[, cMessage ]] )

Purpose

Look up an item in a table, and display an expression.

Arguments

     pTarget -- item to search for

     cAlias -- alias of table to search

     cField -- name of field or expression to return

     ncIndexord -- if passed, index order number or expression to use,
                       else current index is used

     cMessage -- error message to return if item not found;
                     defaults to ""

Setup

All files must be open and indexed properly.

Example

     CHK_DICT( "AAI_DICT" )

     @ 5, 10 SAY FETCH( "10004", "CUSTOMER", ;
                        "Company", "ACCOUNT_NO", ;
                        "Bad customer code" )

Returns

If pTarget is found, the value of cField from the same record is
returned, else cMessage is returned.

Side Effects

All parameters passed must be the correct data type and refer to existing
fields or index orders, or the program will crash.

Artful Calls

IS_CHAR, BLANK, SEEK_REL

Source File

AA_FETCH.PRG

See Also: EXIST() HELP_FILL() LOOKUP() SEEK_REL() DB_CHECK()

Online resources provided by: http://www.X-Hacker.org --- NG 2 HTML conversion by Dave Pearson