Seek difference VO/X# with spaces
Posted: Thu Mar 19, 2020 11:34 am
This is just to inform about a seek difference VO/X#; we actually think it works good in X# an not in VO, but you may need to be aware.
We did have some code where the seek string was adjusted by adding spaces to the end of the string until the length of the field. Yes, we know it's not necessary (e.g. if you search ABC and there is also ABC2, it will still find ABC, also without the space) but it was done like that way back, probably originally with a seek value of another field in which case you do need to add these spaces to the 1st field.
Now the actual field length differed from what it should be, let's say C30 instead of C40 we expected.
In VO a seek like this works: cSeach:="ABCDE"+SPACE(35)
In X# it does not work because the fields is actually ABCDE and 25 spaces.
The X# behavior sounds correct to me but if anyone is having code like this you need to be aware of this difference.
Dick
We did have some code where the seek string was adjusted by adding spaces to the end of the string until the length of the field. Yes, we know it's not necessary (e.g. if you search ABC and there is also ABC2, it will still find ABC, also without the space) but it was done like that way back, probably originally with a seek value of another field in which case you do need to add these spaces to the 1st field.
Now the actual field length differed from what it should be, let's say C30 instead of C40 we expected.
In VO a seek like this works: cSeach:="ABCDE"+SPACE(35)
In X# it does not work because the fields is actually ABCDE and 25 spaces.
The X# behavior sounds correct to me but if anyone is having code like this you need to be aware of this difference.
Dick