Reputation: 328
In Delphi 2010,
if Field.OldValue <> Field.Value then
...
raises the Exception:
raised exception class EVariantTypeCastError with message 'Could not convert variant of type (Array Byte) into type (Integer)'.
How can I know if a TBlobField value has changed?
Upvotes: 1
Views: 1270
Reputation: 159
The code:
if Field is TBlobField then
Result := TBlobField(Field).Modified
allows you to detect if the field was changed, but still does not allow you to obtain the oldValue, if you need to detect WHAT was changed and not IF something was changed.
Upvotes: 0
Reputation: 328
I solved the problem with
if Field is TBlobField then
Result := TBlobField(Field).Modified
Upvotes: 3