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 13:45:39
 
 
To
29/07/1999 12:28:09
General information
Forum:
Visual FoxPro
Category:
Databases,Tables, Views, Indexing and SQL syntax
Miscellaneous
Thread ID:
00247560
Message ID:
00247802
Views:
26
Thanks to Bill, Bruce, Walter, Vinod and Ed.

I think Bruce and Ed got my situation. I'm using the SQL Select to make some searches and output them to a form. So I created a temporary cursor for the ControlSource on the form's control. And I did all the things well when the user enters a valid record to search for. Just that, if the user enters an invalid record, I need to Set Near On to get the nearest matched record. But Set Near On will require either Seek or Find where I need to create a temporary index files.

Maybe the solution is I just create an index tag using Index On.. and then delete the index files after closing the form. Got a better way?
Gan

>>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?
>>
>>Thanks.
>>Gan
>
>In addition to what the others have said, you might want to look at SET NEAR and SET EXACT for this situation.
>
>Bill
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform