Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
IndexSeek ... Trap ?
Message
From
26/03/2002 05:42:12
 
 
To
26/03/2002 03:11:49
Emanuele Bonin
EB Soluzioni Informatiche
Tezze S/B, Italy
General information
Forum:
Visual FoxPro
Category:
Other
Miscellaneous
Thread ID:
00637120
Message ID:
00637147
Views:
19
>Consider the code below .... if you have an indexed cursor with buffering and you want use indexseek to search for the indexed value field you must issue a go top on the table before use of indexseek else even if your value exist on table, the indexseek will return .f. anyway, if you don't use buffering (buffering = 1) you will haven't problems!
>
>Someone have an explanation for this behavior ?? Is A Bug ?

No - the index isn't updated until the data is committed from the buffer to the backing table - it's exactly the behavior expected. INDEXSEEK works against the backing data; you have no way to 'see' uncommitted data at other stations (or even in other datasessions of your running app that have not committed the data to the table). It's a matter of using the wrong command to do what you're trying to do.

The reason that 'go top' seems to fix things for you is that by moving the record pointer with record-buffering that commits the data when the record pointer changes is that your 'go top' commits the data - if you were using table buffering or allowed multiple uncommitted record changes to accumulate, 'go top' would not fix things. This ties in with the logic of needing to change buffer modes when generating or rebuilding indexes on views.
EMail: EdR@edrauh.com
"See, the sun is going down..."
"No, the horizon is moving up!"
- Firesign Theater


NT and Win2K FAQ .. cWashington WSH/ADSI/WMI site
MS WSH site ........... WSH FAQ Site
Wrox Press .............. Win32 Scripting Journal
eSolutions Services, LLC

The Surgeon General has determined that prolonged exposure to the Windows Script Host may be addictive to laboratory mice and codemonkeys
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform