Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
How can SEEK() return .T. but have the wrong record?
Message
 
General information
Forum:
Visual FoxPro
Category:
Databases,Tables, Views, Indexing and SQL syntax
Miscellaneous
Thread ID:
00903416
Message ID:
00903444
Views:
17
Jim,

DO you have anything else that might be moving the record pointer?

At the time of seek can you do something like:

seek(...)
debugout tableName.locID

to see if if it's correct at that instant.

>I'm working with a table that has two indices for it. One index is the primary index using a numeric field, LocID. Let's call this index LOCID.
>
>The second index is a composite equal to a combination of two fields, like so: STR(ParentID)+STR(ChildOrder). Call this index TREEORDER.
>
>This table is used to populate a TreeView control, where the ParentID is the LocID of the parent of this child node, and the ChildOrder is a number that is used to put the children of a node into the correct order.
>
>When I am populating the TreeView control, I SET ORDER TO TREEORDER.
>
>In any case, I'm working on a Drag&Drop function that allows me to move nodes around. At no time do I change the LocID of any record.
>
>What is odd, is that at times I can SET ORDER TO LOCID, and SEEK()for a certain value. The result is .T., and the record pointer is on the correct record. Later, I can do that same thing, SET ORDER TO LOCID, and do the same SEEK(). It again returns .T., but the record pointer is on Record #1, the wrong record!
>
>I don't see how this is possible if I never change the value of LocID for any records?
df (was a 10 time MVP)

df FoxPro website
FoxPro Wiki site online, editable knowledgebase
Previous
Reply
Map
View

Click here to load this message in the networking platform