Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
SET NEAR ON - why recno() still returns max number?
Message
General information
Forum:
Visual FoxPro
Category:
Databases,Tables, Views, Indexing and SQL syntax
Environment versions
Visual FoxPro:
VFP 8 SP1
OS:
Windows XP SP2
Miscellaneous
Thread ID:
01008622
Message ID:
01008628
Views:
17
>Hi everybody,
>
>I have these values in my cursor
>
>CodeVal
>0100
>0101
>0110X
>etc.
>
>I do
>SET NEAR ON
>LOCATE FOR upper(CodeVal) = "0102"
>?recno()
>
>It returns 581 (I have 580 records in this cursor). Why it's not working and not giving me the third record? I have SET EXACT OFF as well.

Hi Nadya,
SET NEAR ON affect of SEEK and FIND and not of LOCATE.
TRY
INDEX ON CodeVal
SET ORDER to Codeval
SET NEAR ON
SEEK '0102'
? RECNO() &&& return 3
_______________________________________________________________
Testing displays the presence, not the absence of bugs.
If a software application has to be designed, it has to be designed correctly!
_______________________________________________________________
Vladimir Zografski
Systems Analyst
Previous
Reply
Map
View

Click here to load this message in the networking platform