LargeInt Fields
LargeInt Fields
After update unidac to 3.60.0.15 version we cannot access LargeInt field with Value property. Instead we have to do AsInteger to work.
If we use Table.FieldByName('LargeIntField').Value it raises "Cannot access field 'LargeIntField' as type Variant" error.
On prior version (3.0.0.9) it's not happened.
If we use Table.FieldByName('LargeIntField').Value it raises "Cannot access field 'LargeIntField' as type Variant" error.
On prior version (3.0.0.9) it's not happened.
If you don't use persistent fields, you should use the following code:In this way you determine that Delphi must use the TLargeintField.Value property that is defined in the following way:In this case there will be no error. If you don't do this, Delphi will invoke the TField.SetAsVariant method, and this method will invoke the TLargeintField.SetVarValue method that is defined in the following way:
If you use persistent fields, you should use the following code:In this case the TLargeintField.SetAsLargeint will be invoked and there will be no error.
Code: Select all
TLargeintField(Table.FieldByName('LargeIntField')).Value
Code: Select all
property Value: Largeint read GetAsLargeint write SetAsLargeint;
Code: Select all
procedure TLargeintField.SetVarValue(const Value: Variant);
begin
raise AccessError('Variant'); // here this error is raised
end;
Code: Select all
TableLargeIntField.Value