xHarbour Reference Documentation > Function Reference xHarbour Developers Network  

Dblist()

Displays records of a work area to the console, printer or file.

Syntax

DbList( [<lOff>]    , ;
        [<aBlocks>] , ;
        [<lAll>]    , ;
        [<bFor>]    , ;
        [<bWhile>]  , ;
        [<nNext>]   , ;
        [<nRecord>] , ;
        [<lRest>]   , ;
        [<lToPrint>], ;
        [<cOutFile>]  ) --> lSuccess

Arguments

<lOff>
This parameter defaults to .F. (false) so that record numbers are displayed in the first column of the data output. Passing .T. (true) suppresses the output of record numbers
<aBlocks>
An optional one dimensional array holding code blocks can be specified. All code blocks are evaluated for each record. The return values of the code blocks are output. If <aBlocks> is not given, the values of all fields of records is displayed
<lAll>
This parameter defaults to .T. (true) so that all records are processed.
<bFor>
This is an optional code block which must return a logical value. The code blocks in <aBlock> are evaluated for all records where <bFor> yields .T. (true). <aBlocks> is not executed for records where <bFor> yields .F. (false).
<bWhile>
This is an optional code block which must return a logical value. <aBlocks> is evaluated while <bWhile> yields .T. (true). DbList() returns immediately as soon as <bWhile> yields .F. (false).
<nNext>
An optional numeric parameter restricting the number of records to process to <nNext>, beginning with the current record.
<nRecord>
Only a single record is processed when the record number <nRecord> is specified.
<lRest>
An optional logical value that defaults to .F. (false). In this case, <aBlocks> is evaluated for all records. Specifying .T. (true) causes DbList() to start output with the current record and continue until the end of file is reached.
<lToPrint>
This parameter defaults to .F. (false). When set to .T. (true), output is directed to the printer.
<cOutFile>
The output can be directed to a file with the name <cOutFile>. Note that <lToPrint> and <cOutFile> are mutually exclusive.

Return

The function returns .T. (true) on success, and .F. (false) on failure.

Description

DbList() is the functional equivalent of the LIST command. Refer to LIST for a detailed description of displaying records to the console, printer or file.

Info

See also:DbEval(), LIST, QOut()|QQOut()
Category: Database functions , xHarbour extensions
Source:rdd\dblist.prg
LIB:xhb.lib
DLL:xhbdll.dll


Copyright © 2006-2007 xHarbour.com Inc. All rights reserved.
http://www.xHarbour.com
Created by docmaker.exe