Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Can I SEEK for nearest matched record in CURSOR?
Message
From
29/07/1999 08:08:46
 
 
To
29/07/1999 06:13:20
General information
Forum:
Visual FoxPro
Category:
Databases,Tables, Views, Indexing and SQL syntax
Miscellaneous
Thread ID:
00247560
Message ID:
00247590
Views:
18
>All,
>
>I have a SQL Select for putting all my records in a cursor, and I need to do some search in the cursor.
>
>I''m be able to use LOCATE to look for a certain record but couldn't use SEEK or FIND because both of them need an index tag. I need to search for the nearest matched record in the cursor in case LOCATE fails.
>
>Any solution for this?

SEEK only works if there's an index in place; if you want to use SEEK, you need to create an index on the cursor after creating it. You can either create a single index using INDEX ON...TAG on a read-only cursor, reopening the cursor for read/write will allow you to create mutliple TAGs. You can create as many IDX files on a read-only cursor as you like (each will be a separate .IDX file) but they will not auomatically disappear when the cursor is closed, unlike TAGs, which by dfault are a part of a structural .CDX which is cleaned up automatically.
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
Reply
Map
View

Click here to load this message in the networking platform