RDD

FieldWBlock()

Return a set-get block for a field in another work area

Syntax

Signature
FieldWBlock( cFieldName, nWorkArea ) --> bFieldWBlock

Arguments

cFieldName

Field name. nWorkArea Target work-area number.

Return value

A block that reads or assigns the named field in the specified work area.

Description

FieldWBlock() creates a field block bound to a work area other than the current one.

Notes

The target area and field must exist when the block is used.

Example

FieldWBlock.prg
PROCEDURE Main()

   LOCAL bName

   DbUseArea( .T., , "people.dbf", "People" )
   bName := FieldWBlock( "NAME", Select() )
   QOut( "Name: " + RTrim( Eval( bName ) ) )
   DbCloseArea()

RETURN

Output

See also