Prototype
TableSetFieldByName(intTableHandle, strFieldName, strFieldValue)
Description
It sets the field value by using the field name as indicator.
Parameters
IntTableHandle: integer value corresponding to the table handle.
StrFieldName: string corresponding to the field name.
StrFieldValue: new field value.
Returned value
None.
Notes
If the new field value is not String type it needs to convert it by using the functions
IntToStr, FloatToStr,
Example
// It stores the table handle
UnaTabella:= TableOpen('c:\documents\index','statistics.db');
//It executes a division
Quotient:= 89/14;
//It rounds quotient (6)
QuozInt:=Round(Quotient);
//It converts into string
QuozIntStr:=IntToStr(QuozInt);
//It sets the edit mode del record corrente
TableEdit(UnaTabella);
// It changes the field value
TableSetFieldByName(UnaTabella, 'Value', QuozIntStr);
//It confirms the change
TablePost(UnaTabella);
// It executes other operations
// It closes the table
TableClose(UnaTabella);