fbpx
Welcome, Guest
Username: Password: Remember me
  • Page:
  • 1

TOPIC: Seek difference VO/X# with spaces

Seek difference VO/X# with spaces 2 weeks 3 days ago #13783

  ic2's Avatar Topic Author ic2 Offline Posts: 646
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

Please Log in or Create an account to join the conversation.

Seek difference VO/X# with spaces 2 weeks 3 days ago #13785

  Chris's Avatar Chris Offline Posts: 1753
Hi Dick,

Is this for when using ADS, or plain dbfs? I had noticed something similar myself recently when I was working on a project using ADS, that ADS behaves differently than VO in this area.
XSharp Development Team
chris(at)xsharp.eu

Please Log in or Create an account to join the conversation.

Seek difference VO/X# with spaces 2 weeks 3 days ago #13786

  ic2's Avatar Topic Author ic2 Offline Posts: 646
Hello Chris,

Kees noticed it on the web program, which uses DBFCDX.

Probably both X# and ADS work as you would expect and VO actually does not in this respect.

Dick

Please Log in or Create an account to join the conversation.

Seek difference VO/X# with spaces 2 weeks 3 days ago #13791

  Chris's Avatar Chris Offline Posts: 1753
Hi Dick,

Are you using the same settings regarding soft seek etc? Do you have a sample you can send to reproduce this difference?
XSharp Development Team
chris(at)xsharp.eu

Please Log in or Create an account to join the conversation.

Seek difference VO/X# with spaces 2 weeks 2 days ago #13802

  ic2's Avatar Topic Author ic2 Offline Posts: 646
Hello Chris,

Yes, it was exactly the same code, we are converting it from VO. But I think we should leave it like that. Basically I can imagine that searching with more characters + trailing spaces than the field is long which works in VO and not in X# was wrong in VO and works correctly in X#..

Dick

Please Log in or Create an account to join the conversation.

  • Page:
  • 1