TableGetField |
Top Previous Next |
Prototype
StrFieldValue:=TableGetField(intTableHandle, intFieldNumber)
Description
Restores the field value by using a progressive field number as indicator.
Parameters
IntTableHandle: integer value corresponding to the table handle.
IntFieldNumber: integer value corresponding to the progressive field number.
Returned value
StrFieldValue: shown field value.
Notes
None.
Example
// Opens a table TableOne:=TableOpenBDE('c:\invoices\index','invoices.db');
name:=TablegetFieldname(TableOne,1);
// Order the table according to a field TableSetIndex(TableOne, name);
// Store the index 1 field data FieldValue:='Smith';
// Search for data within the table and places itself on the record TableFindNearest(TableOne,FieldValue);
// Store the table field value into a variable FoundValue:=TableGetField(TableOne,1);
// If the table value is different than the field one then… If FoundValue<>FieldValue Then Begin
// Set the table insert mode TableInsert(TableOne);
// Store the field value in a new record TableSetField(TableOne,1,FieldValue);
// Confirm the table change TablePost(TableOne); End;
// Close the table TableClose(TableOne);
|