Hi,
We have licenced version of SDAC components.
I have an issue in my project, to sloved it i have made changes in MemData.pas file of TMemData.CompareStrValues() procedure.
Modification:
//If the Value is blank then making it to 1 when Length(FieldValue) > 0
....
else
if (ValueLen = 0) then
ValueLen := 1;
if lxCaseInsensitive in Options then
Res := AnsiCompareTextS(Value, Copy(FieldValue, 1, ValueLen))
This is becuase, comparing blank value is not happing properly.
Res := AnsiCompareTextS(Value, Copy(FieldValue, 1, ValueLen))
Ex: Value=''; //blank
FieldValue='A'
Now AnsiCompareTextS('', Copy('A', 1, 0)) is returning 0 (ie. True).
I feel above statement should be AnsiCompareTextS('', Copy('A', 1, [b]1)). After chaning it is returning Flase value.
When we are comparing blank value with 'A' which should returns false. But it is returing True becuase of ValueLen is '0'.
So i have added if condition. Please confirm the change which i have made is OK??? or does it leads to any problems....
Problem in the project: I have a screen where it has 2 components
1. Index Flip Flop - Component written by us using TEdit class
It's just like a drop down box and it is data ware contol.
2. Grid
Index Flip Flop list all the values. If i select first value then grid will sort with the selected value. Now if i remove the value from the Index Flip Flop then sort should remains same. But it is not happing like this.
It is sorting with the first index value in the Flip Flop.
pl let me know if the above description is not very clear...