Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
BUG: FIX Q319001 is incomplete.
Message
 
 
To
31/08/2003 17:31:14
General information
Forum:
Visual FoxPro
Category:
Other
Miscellaneous
Thread ID:
00824973
Message ID:
00825114
Views:
23
Hi Fabio,

Your code runs correctly under VFP6SP5 but not under VFP7SP1 or later. So it looks like a bug to me. However I'm not sure why you included KEYMATCH() here. It never respected SET KEY and, IMO, it shouldn't.

>My only problem:
>
>Why VFPT developer donnot have test the fix for not active index ?


So bug itself doesn't bother you?


>Hi,
>
>On MS FIX Q319001 report a fixing for a BUG on SEEK(), the INDEXSEEK(), and the LOOKUP().
>The fixing is incomplete, it fix the bug only for active index.
>When use SEEK(), INDEXSEEK() or LOOKUP() on not active index, VFP not test SET KEY restriction, and allow access to hidden records.
>
>This is only a simplified repro code !!
>
>
>_SCREEN.Cls
>_SCREEN.Fontname="Courier New"
>@0,0
>SET DELETED OFF	&& OFF/ON is equal
>CREATE CURSOR MyCursor ( A I)
>
>  INSERT INTO MyCursor (A) VALUES (2)
>  INSERT INTO MyCursor (A) VALUES (1)
>
>INDEX ON A TAG TAG1
>INDEX ON A TAG TAG2
>
>SET KEY TO 1
>
>? 'ONLY RECORDS WITH A=1 IS ACCESSIBLE'
>
>?'KEYMATCH(2) '	,CHR(9)+'ON ACTIVE INDEX :'		,KEYMATCH(2,TAGNO('TAG2'));
>				,CHR(9)+'ON NOT ACTIVE INDEX :'	,KEYMATCH(2,TAGNO('TAG1'))
>SEEK 2 ORDER TAG2
>?'SEEK   2    '	,CHR(9)+'ON ACTIVE INDEX :'		,FOUND()
>SEEK 2 ORDER TAG1
>??				 CHR(9)+'ON NOT ACTIVE INDEX :'	,FOUND()
>
>* Next funtions have the BUG
>
>?'SEEK(2)     '	,CHR(9)+'ON ACTIVE INDEX :'		,SEEK(2,1,'TAG2')	;
>				,CHR(9)+'ON NOT ACTIVE INDEX :'	,SEEK(2,1,'TAG1')
>
>?'INDEXSEEK(2)'	,CHR(9)+'ON ACTIVE INDEX :'		,INDEXSEEK(2,.F.,1,'TAG2')	;
>				,CHR(9)+'ON NOT ACTIVE INDEX :'	,INDEXSEEK(2,.F.,1,'TAG1')
>
>?'LOOKUP(2)'		,CHR(9)+'ON ACTIVE INDEX :'		,LOOKUP(A,2,A,'TAG2')	;
>				,CHR(9)+'ON NOT ACTIVE INDEX :'	,LOOKUP(A,2,A,'TAG1')
>
>
--sb--
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform