RDD

FieldPut()

Set a field value by position

Syntax

Signature
FieldPut( nField, expAssign ) --> ValueAssigned

Arguments

nField

One-based field position. expAssign New field value.

Return value

The value assigned to the field.

Description

FieldPut() writes expAssign into a field of the current record by ordinal position.

Notes

The work area must be writable. Call DbCommit() to flush the update.

Example

FieldPut.prg
PROCEDURE Main()

   DbUseArea( .T., , "people.dbf", "People" )
   QOut( "Assigned: " + RTrim( FieldPut( 1, "Anna" ) ) )
   DbCommit()
   DbCloseArea()

RETURN

Output

See also