RDD

DbFilePut()

Insert the contents of a file into a field

Syntax

Signature
DbFilePut( nFieldPos, cSourceFile ) --> lSuccess

Arguments

nFieldPos

One-based field position. cSourceFile Source file.

Return value

.T. when the field is updated successfully; otherwise .F..

Description

DbFilePut() reads an external file and stores its contents in the selected field of the current record.

Notes

The current work area must be writable and the record must be valid.

Example

DbFilePut.prg
PROCEDURE Main()

   DbUseArea( .T., , "people.dbf", "People" )
   QOut( "File put: " + IIF( DbFilePut( 1, "field.txt" ), "OK", "ERROR" ) )
   DbCloseArea()

   RETURN

Output

See also