[<<Previous Entry] [^^Up^^] [Next Entry>>] [Menu] [About The Guide]
Function            BLDDBF()
Action              Create a DBF from a delimited string
Returns             <expL> based on success.
Category            DBF
Syntax              BLDDBF(<expC1>,<expC2>|<array>)
Description         Creates DBF file named <expC1> from delimited
                    strings in <expC2>|<array>.

                    Parameter 2 is either:
                    1. a Delimited string in the
                      form  "name,type,[size],[decimals]:name,type..."
                      Fields delimited by colon, field elements
                      delimited by commas.
                                -- or --
                    2. an array of delimited strings in
                    the form "name,type,[size],[decimals]". One field
                    per array element, field elements delimited
                    by commas.
Examples            1. Passing long delimited string
                       BLDDBF('CUSTOMER','LNAME,C,15:FNAME,C,10:
                       AGE,N,2:PROSPECT,L:')

                    2. Passing array of short delimited strings
                       declare newdbf[4]
                       newdbf[1]="LNAME,C,15"
                       newdbf[2]="FNAME,C,10"
                       newdbf[3]="AGE,N,2"
                       newdbf[4]="PROSPECT,L"

                       BLDDBF('CUSTOMER',M->newdbf)

Notes               I'd stick to small DBFs on this one 5 - 10 fields.
                    if using a long delimited string.

                    BLDDBF() expects an unused area to work in, and
                    will return .f. if it detects a DBF open in
                    the current area. An overwrite will not be
                    allowed.
Found in (prg)......S_BLDBF.PRG

This page created by ng2html v1.05, the Norton guide to HTML conversion utility. Written by Dave Pearson