Assigns the DataType and Value properties from a TField object.
procedure AssignFieldValue(Field: TField; const Value: Variant);
Use AssignFieldValue to set the Value property to the value passed as the Value parameter. AssignFieldValue assumes that the Value represents a value from a field like the Field parameter, and assigns the DataType property accordingly. AssignFieldValue sets the Bound property to True.
Unlike AssignField, AssignFieldValue does not name the parameter after the field object.
function Assigned(var P): Boolean;
Description
Use Assigned to determine whether the pointer or procedure referenced by P is nil. P must be a variable reference of a pointer or procedural type. Assigned(P) corresponds to the test P<> nil for a pointer variable, and @P <> nil for a procedural variable.
Assigned returns False if P is nil, True otherwise.
property OldValue: Variant;
Description
Read the OldValue property to examine or retrieve the original value of the field that was obtained from the dataset before any new values were written to the record buffer. For example, this code replaces current pending changes with a field抯 original value:
NewValue := OldValue;
Once records are posted successfully, the old field value cannot be retrieved.
Delete removes a substring of Count characters from string S starting with S[Index]. S is a string-type variable. Index and Count are integer-type expressions.
If Index is larger than the length of S, no characters are deleted. If Count specifies more characters than remain starting at the S[Index], Delete removes the rest of the string.
var
s: string;
begin
s := 'Honest Abe Lincoln';
Delete(s,8,4);
Canvas.TextOut(10, 10, s); { 'Honest Lincoln' }
end;