FILEFLEX API REFERENCE



NAME
DBGetMatchList -- Retrieve a list of matches

SYNTAX
DBGetMatchList(spec, max-lines)

CATEGORY
Match Lists, Tables, and Columns

DESCRIPTION
NEW IN FILEFLEX 3.0

This routine takes a specification variable as the first parameter and the maximum lines to return as the second parameter. DBGetMatchList runs through the current index or relation and returns one or more columns of data in index or relation order.

The spec variable determines the data to be returned and is formatted this way (one set per line): globalname,fieldname

Note, the field name can be specified as FILE->FIELD, although the results of this are unpredictable outside relational queries.

The function can return up to 32 columns (it can fill globals with up to 32 field lists. There are some limitations to be aware of. This function does not support encrypted data. It will not decrypt nor can the DBEncrypt function be used because plain-text carriage returns are placed between each record's field data. This function also has the potential to consume a large amount of temporary memory (it's freed up upon exiting the function). If the second parameter is set to 0, DBGetMatchList will retrieve as much data as will fit in a 32K buffer. This means that for each global you request, the function temporarily allocates 32K. To reduce this, specify the maximum lines. For example, if you specified 50 lines maximum and the field you're retrieving is 10 chars in width, you'd temporarily allocate 500 bytes instead of 32,000.

The function leaves the record pointer on the last record who's data has been returned. To get more data, perform a DBSkip(1) and then call DBGetMatchList again. If there's more data to be received and execution was successful, it returns 0. If it's reached the end of the matches, it returns 3.


EXAMPLE
put DBGetMatchList(mySpec, 0) into DBResult

SEE ALSO
DBCountMatches, DBSuperPadString, DBColumnMash, DBFillColumn

INTERNAL FUNCTION NUMBER
97


Copyright © 1992-1998 by David Gewirtz, under license to Component Enterprises, Inc.
Contact: info@component-net.com

Casa de Bender