[<<Previous Entry]
[^^Up^^]
[Next Entry>>]
[Menu]
[About The Guide]
FIELDWBLOCK() Does not work per 'Guide' description.
Clipper Version 1.03 dtd 09/15/90.
Problem Statement
FIELDWBLOCK(<cFieldName>, <nWorkArea>) does not access nWorkArea; e.g.,
USE test1 ALIAS one NEW; nOne:= Select() // cFieldName is keyid
USE test2 ALIAS two NEW; nTwo:= Select() // cFieldName is last_name
? EVAL(fieldwblock ("last_name", nTwo)) // works ok.
? EVAL(fieldwblock ("keyid", nOne)) // does not work.
Work Around(s) as submitted by MIKE SCHINKEL 73567,3612.
USE test1 ALIAS one NEW; nOne:= Select()
USE test2 ALIAS two NEW; nTwo:= Select()
? one->( EVAL( FieldWBlock( "keyid", nOne ) ) ) // Both these
? ( nOne )->( EVAL( FieldWBlock( "keyid", nOne ) ) ) // are same.
? two->( EVAL( FieldWBlock( "last_name", nTwo ) ) ) // Both these
? ( nTwo )->( EVAL( FieldWBlock( "last_name", nTwo ) ) ) // are same.
Notes
A description of FIELDWBLOCK's behaviour, as submitted by Manuel
Gonzalez 71121,1442, is as follows:
1) If the work-area number fed to FIELDWBLOCK is the same as the current
work area and the field exists, it returns the field's value when
it's EVALuated.
2) If the work-area number fed to FIELDWBLOCK is the same as the current
work area and the field does not exist, it returns NIL.
3) If the work-area number fed to FIELDWBLOCK is not the same as the
current work area and the field does not exist in the work area
specified, ERRORSYS says: "Variable does not exist: (fieldname)."
4) If the work-area number fed to FIELDWBLOCK is not the same as the
current work area and the field DOES exist in the work area spe-
cified, FIELDWBLOCK returns NIL. EVALuating FIELDWBLOCK bombs.
This page created by ng2html v1.05, the Norton guide to HTML conversion utility.
Written by Dave Pearson