We have a data file (MyDataFile) with several fields, some of them: SCode (Text, String 20) NLineNo (Numeric, Integer +-999 999 999 --> 4-byte) DStartDate (Date, yyymmdd) It also has a composite key: IND_Code_LineNo_StartDate (with all 3 fields of above)
Looking at the data in HFSQL Control Center this index seems to be filled correctly. I even reindexed the table to be sure.
Now I'm trying to access data with this index:
nLineNo is int = 30000 HFilter(MyDataFile,IND_Code_LineNo_StartDate,["S12345",nLineNo,hMinVal], "S12345",nLineNo,hMaxVal]) I'm not getting any result.
This workaround does work and gets me the desired result: HFilter(MyDataFile,IND_Code_LineNo_StartDate,["S12345",hMinVal], "S12345",hMaxVal], "NLineNo="+nLineNo)
I'm now using the workaround, but what is wrong with the first variant?
I even tried using minVal is buffer = HBuildKeyValue(MyDataFile,IND_Code_LineNo_StartDate,"S12345",nLineNo,hMinVal) maxVal is buffer = HBuildKeyValue(MyDataFile,IND_Code_LineNo_StartDate,"S12345",nLineNo,hMaxVal) HFilter(MyDataFile,IND_Code_LineNo_StartDate, minVal, maxVal) In the debugwindow I get the following as values: minVal: "S12345<0><0><0><0><0><0><0><0><0><0><0><0><0><0>0u<0><0><0>" maxVal: "S12345<0><0><0><0><0><0><0><0><0><0><0><0><0><0>0u<0><0>ÿ" On first glance, I would say this is definitely wrong. there should be 30000 instead of 0u. But why?
So has anyone any ideas, what I'm missing?
Thanks a lot for your answer. |