Click or drag to resize

FieldPutSym Function

X#
Set the value 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 FieldPutSym(
	symField AS SYMBOL,
	uNewValue AS USUAL
) 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.
uNewValue
Type: Usual
The value to assign to the field.
The data type of this expression must match the data type of the field.

Return Value

Type: Usual
The value assigned to the field.
If symField does not correspond to a field in the current database file, FieldPutSym() returns NIL.
Remarks
FieldPutSym() assigns a new value to a field using its symbolic field name within the database file structure, rather than the string representation of field name.
Tip Tip
FieldPutSym() 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.
Examples
This example sets a new value for the contents of the Firstname field in the TestDBF database:
X#
1USE TestDBF NEW
2FieldPutSym(#Firstname, "Marijo")
3? FieldGetSym(#Firstname)            // Marijo
4USE
5WAIT
See Also