Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Problem with BINTOC() indexes
Message
From
05/04/2005 11:35:50
 
 
To
05/04/2005 10:57:53
General information
Forum:
Visual FoxPro
Category:
Other
Miscellaneous
Thread ID:
01001506
Message ID:
01001518
Views:
16
This message has been marked as the solution to the initial question of the thread.
>Hi all,
>I have two tables: EBILLHD.DBF and EBILLDT.DBF; which has a parent-child relationship. They are related as such: EBILLHD.ETAG 1-to-many EBILLHD.ETRANTAG. There are 6569 rows in EBILLHD with a max value of ETAG = 26858. There are 35602 rows in EBILLDT. There is at least one EBILLDT row for each EBILLHD record. We are deploying the applications using VFP8 runtimes.
>
>This is my problem and I don't know what caused it. For a series of EBILLHD.ETAGs, the relation does not work, meaning - zero record browsed, in this code:
>
>SELE 0
>USE EBILLHD
>INDEX ON BINTOC(ETAG) TO TEMP
>SELE 0
>USE EBILLDT
>SET RELATION TO BINTOC(ETRANTAG) INTO EBILLHD
>BROWSE FOR EBILLHD.ETAG = 26815 && WORKS
>BROWSE FOR EBILLHD.ETAG = 26816 && DOES NOT WORK
>BROWSE FOR EBILLHD.ETAG = 26817 && DOES NOT WORK
>BROWSE FOR EBILLHD.ETAG = 26818 && DOES NOT WORK
>BROWSE FOR EBILLHD.ETAG = 26819 && DOES NOT WORK
>BROWSE FOR EBILLHD.ETAG = 26820 && WORKS
>
>
>These are some things that I did to try to resolve the problem:
>1. Copy the contents of both file to temporary files and zapped the original files and reindexed the zapped files then appended back the data. Did not work.
>2. Use STR() instead of BINTOC() and it WORKS.
>3. Used BINTOC(ETAG,4) with second parameter. Did not work.
>4. Copied the two files using COPY TO ... CDX to temporary files. Dropped tables from DBC. Copied back from temp files using COPY TO ... CDX. Added newly created files to DBC. This works.
>
>I would have thought item#1 would work. Why did it not work? Using item#2 works but requires new EXE and is the last option. I will create a script that I can use to fix the problem using item#4.
>
>Still, I am afraid that the same problem will occur. Does anyone have the same problem or at least now why VFP behaves this way or what causes this problem. Thoughts/comments/feedbacks/etc are always welcome.

VFP8 bug. Message #849127

Fixed on VFP9.
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform