I've just had a problem with the use of a scope with Xbase++ 2.0 that I never had with 1.9.
In our system the account code fields in the databases are 6 characters long. We have a database that holds the header details for repeat orders and there can be multiple records for the same customer.
The index on this repeat order database is:
ACCOUNT+str(NUMBER,6)
In the repeat order setup dialog we have a browse on that database that uses scopes to stop the empty records at the top of the index being shown. I set the scope using:
DC_SetScope(0,"!")
DC_SetScope(0,"~")
The start scope is '!' as it is the first printable ASCII character.
The end scope is '~' as to my mind this is the last printable ASCII character (126) in the 0-127 ASCII range.
In 1.9, this works fine with an NTX index (I have not tried it with a CDX index at present).
In 2.0, this does not work with a CDX index.
What happens is that the browse is shown correctly. In my database there are 4 records and the below is just the data in the 2 relevant fields:
Code: Select all
Account Number
ACT001 1
ACT001 2
ALB001 5
Z901 4
But you cannot move the browse cursor up or down. If you move the browse cursor right to scroll the extra columns in the browse into view, the shown data in the browse clears and only one line is shown with 'rubbish' data in it.
It appears that it is not understanding the end scope value.
Has anyone else seen anything similar?
I had to change the end scope to just be 'Z' for it to work correctly but if any of our customers are using the '~' character on the front of their account codes it's gonna be a problem...