RDD

DbFileGet()

Insert the contents of a field into a file

Syntax

Signature
DbFileGet( nFieldPos, cTargetFile, nMode ) --> lSuccess

Arguments

nFieldPos

One-based field position. cTargetFile Destination file.

nMode

Optional transfer mode, 0 or 1.

Return value

.T. when the field contents are written successfully; otherwise .F..

Description

DbFileGet() writes the contents of the selected field of the current record to an external file. It is intended for file-backed field values.

Notes

The current work area and record must be valid.

Example

DbFileGet.prg
PROCEDURE Main()

   DbUseArea( .T., , "people.dbf", "People" )
   QOut( "File get: " + IIF( DbFileGet( 1, "field.txt", 0 ), "OK", "ERROR" ) )
   DbCloseArea()
   FErase( "field.txt" )

   RETURN

Output

See also