Subject | TIBODataSet, InternalDataSet.Fields.RowData and OldRowData |
---|---|
Author | tibotaka |
Post date | 2006-02-19T13:51:34Z |
To prevent unnecessary posts to database I use DataSet OnBeforePost
event (code snippet):
...
with IB_DataSet do
begin
if (Fields.RowData = Fields.OldRowData) then
Cancel;
end;
...
This perfectly works wit TIB_* (datasets & edits) stuff.
Now I'm forced to use TIBO* datasets and this approach is not
working anymore when user
...edits some text field -> reverts this field to the old value ->
posts...
because in this particular case always
...(some TIBODataSet).InternalDataSet.Fields.RowData <> (some
TIBODataSet).InternalDataSet.Fields.OldRowData...
due the fact, that
in RowData hex representation of modified text field is right
aligned to its lenght with '00'(hex)
and
in OldRowData hex representation of this (the same) text field is
right aligned with '20'(hex - SPACE)
in spite of the fact, that value remains the same.
Is this designed behaviour or am I doing something in wrong way?
With TIB_* (datasets & edits) stuff in this case text fields are
aligned with '20' (hex) in both RowData and OldRowData.
I am using D7 (build 8.1) with IBObjects 4.5B.
Thanks for your answer in advance and - sorry for my english...
tibotaka
event (code snippet):
...
with IB_DataSet do
begin
if (Fields.RowData = Fields.OldRowData) then
Cancel;
end;
...
This perfectly works wit TIB_* (datasets & edits) stuff.
Now I'm forced to use TIBO* datasets and this approach is not
working anymore when user
...edits some text field -> reverts this field to the old value ->
posts...
because in this particular case always
...(some TIBODataSet).InternalDataSet.Fields.RowData <> (some
TIBODataSet).InternalDataSet.Fields.OldRowData...
due the fact, that
in RowData hex representation of modified text field is right
aligned to its lenght with '00'(hex)
and
in OldRowData hex representation of this (the same) text field is
right aligned with '20'(hex - SPACE)
in spite of the fact, that value remains the same.
Is this designed behaviour or am I doing something in wrong way?
With TIB_* (datasets & edits) stuff in this case text fields are
aligned with '20' (hex) in both RowData and OldRowData.
I am using D7 (build 8.1) with IBObjects 4.5B.
Thanks for your answer in advance and - sorry for my english...
tibotaka