Click or drag to resize

FieldGetSym Function

X#
Retrieve the contents of a field that is identified by its symbolic name.

Namespace:  XSharp.RT
Assembly:  XSharp.RT (in XSharp.RT.dll) Version: 2.19
Syntax
 FUNCTION FieldGetSym(
	symField AS SYMBOL
) AS USUAL
Request Example View Source

Parameters

symField
Type: Symbol
The symbolic name of the field in the database file structure for the current work area.

Return Value

Type: Usual
The value of the specified field.
If symField does not correspond to a field in the current database file, FieldGetSym() returns NIL.
Remarks
FieldGetSym() retrieves the value of a field using its symbolic field name within the database file structure, rather than the string representation of the field name.
Tip Tip
FieldGetSym() can be used with a BLOB field (that is, a memo field associated with a BLOB file), provided the length of the field does not exceed 64KB.
For BLOB fields longer than 64KB, use the BLOBGet() function instead.
Examples
This example retrieves the contents of the Lastname field in the TestDBF database:
X#
1USE TestDBF NEW
2DO WHILE !EOF()
3    ? FieldGetSym(#Lastname)    // Smith
4    Skip
5ENDDO
6USE
7WAIT
See Also