Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
BUG: FIX Q319001 is incomplete.
Message
From
31/08/2003 17:31:14
 
 
To
All
General information
Forum:
Visual FoxPro
Category:
Other
Title:
BUG: FIX Q319001 is incomplete.
Miscellaneous
Thread ID:
00824973
Message ID:
00824973
Views:
45
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')
My only problem:

Why VFPT developer donnot have test the fix for not active index ?

Fabio
Next
Reply
Map
View

Click here to load this message in the networking platform