Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Indexseek() not working with a cursor
Message
From
16/11/2015 13:58:10
 
General information
Forum:
Visual FoxPro
Category:
Other
Environment versions
Visual FoxPro:
VFP 9 SP2
OS:
Windows 10
Network:
Windows 2008 Server
Database:
Visual FoxPro
Application:
Desktop
Miscellaneous
Thread ID:
01627510
Message ID:
01627514
Views:
50
>I am experiencing a strange problem with a cursor.
>I am using indexseek() in the interactive change of a text box in order to update a navigation grid.
>The cursor is indexed and contains 5 tags. One tag is named 'customer'.
>A snipet of my searching code is as follows:
>
>IF TYPE(tcSearchValue) $("U,N,C")
> IF INDEXSEEK(tcSearchValue, .F., tcTheTable, tcTheTag)
>******** search value was found
> INDEXSEEK(tcSearchValue, .T., tcTheTable, tcTheTag) && value found, update record pointer
>******** Now update pointer
>**************** Do something
> else
>********* Not found
> endif && IF INDEXSEEK(tcSearchValue, .F., tcTheTable, tcTheTag)
>endif && IF TYPE(tcSearchValue) $("U,N,C")
>
>I am searching an index in a cursor. I pass the the cursor name and tag name to this procedure.
>This works as expected in design mode, but it doesn't as an .app or .exe. It won't find anything I pass it. It returns no errors, just doesn't find any thing.
>
>Any thoughts?

I'm wondering if it might be related to the state of the cursor at runtime. Are you creating the cursor with the NOFILTER clause, or otherwise ensuring it is a "real" cursor rather than a filtered result set? I've found if I'm doing anything serious with cursors I need to use NOFILTER or equivalent or weirdness sometimes results.
Regards. Al

"Violence is the last refuge of the incompetent." -- Isaac Asimov
"Never let your sense of morals prevent you from doing what is right." -- Isaac Asimov

Neither a despot, nor a doormat, be

Every app wants to be a database app when it grows up
Previous
Reply
Map
View

Click here to load this message in the networking platform