I copy the TClientDataSet->Delta
to TPacketDataSet->Data
.
Then I am using TPacketDataSet->Data
to write cached updates to Faircom Server ISAM database record. When using the Modified Record pair, The second copy of the record marked "usModified" holds every field, modified or not, with the unmodified fields carrying NULL
as the NewValue
.
Question: How can I determine which fields carry NULL
value because they were deliberately changed to NULL
, and which fields are NULL
because they weren't changed? Simply writing NewValue
to the persistence layer would result in clearing all field values which were not changed.
Asked
Active
Viewed 52 times
0

Vladimir Ulchenko
- 463
- 2
- 8

Alan Taylor
- 11
- 3
-
What about checking the field's [OldValue](http://docwiki.embarcadero.com/Libraries/en/Data.DB.TField.OldValue)? – Victoria Feb 01 '18 at 19:58
-
It really doesn't help. If NewValue is NULL if not changed, and NULL if changed to NULL, comparing it to OldValue doesn't clarify the intention. – Alan Taylor Feb 02 '18 at 02:36
1 Answers
0
use InitAltRecBuffers and see if NewValue is Unassigned (not changed) or Null (cleaned)

Vladimir Ulchenko
- 463
- 2
- 8
-
-
Thank you vavan. Testing NewValue for VarIsEmpty (Unassigned) was the solution. – Alan Taylor Feb 04 '18 at 21:40