TableSetFieldByName |
Top Previous Next |
Prototype
TableSetFieldByName(intTableHandle, strFieldName, strFieldValue)
Description
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
// Store the table handle TableOne:= TableOpenBDE('c:\documents\index','statistics.db');
// Execute a division Quotient:= 89/14;
// Round the quotient (6) QuozInt:=Round(Quotient);
// Convert to string QuozIntStr:=IntToStr(QuozInt);
// Set the edit mode to the current record TableEdit(TableOne);
// Change the field value TableSetFieldByName(TableOne, 'Value', QuozIntStr);
// Confirm the change TablePost(TableOne);
// Execute other operations
// Close the table TableClose(TableOne);
|