Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
VFP Bug Report; INDEXSEEK() Fails on Buffered Table
Message
From
09/05/2002 16:08:38
 
 
To
All
General information
Forum:
Visual FoxPro
Category:
Databases,Tables, Views, Indexing and SQL syntax
Title:
VFP Bug Report; INDEXSEEK() Fails on Buffered Table
Miscellaneous
Thread ID:
00654727
Message ID:
00654727
Views:
66
INDEXSEEK() Bug Report:

Bug is demonstrated by following code, and is reproducable every time:
CREATE DATABASE temp
CREATE TABLE anytable (pkey I PRIMARY KEY, cChar C(6))
SELECT anytable  && seems superfluous, but anything to make it work
INDEX ON cChar TAG cChar  
SET ORDER TO pkey  && same results if order set to cchar
SET MULTILOCKS ON 
CURSORSETPROP('Buffering',5)

FOR n = 1 TO 10
   INSERT INTO anytable (pkey,cchar) VALUES (n,'string')
	
   IF !INDEXSEEK(n,.F.,'anytable','pkey') && same result with .T. or .F. in move record pointer parameter
      WAIT TRANSFORM(n) WINDOW && no record found ???? Why not?
   ENDIF
ENDFOR

WAIT 'Now try KEYMATCH' WINDOW

FOR n = 11 TO 20
   INSERT INTO anytable (pkey) VALUES (n)
	
   IF !KEYMATCH(n,TAGNO('pkey'),'anytable')
      WAIT TRANSFORM(n) WINDOW && never executed, because KEYMATCH works fine
   ENDIF
ENDFOR

WAIT 'Now try SEEK' WINDOW

FOR n = 21 TO 30
   INSERT INTO anytable (pkey) VALUES (n)
	
   IF !SEEK(n,'anytable','pkey')
      WAIT TRANSFORM(n) WINDOW && never executed, because SEEK also works as advertised
   ENDIF
ENDFOR

=TABLEREVERT()
USE IN anytable
CLOSE DATABASES all

ERASE anytable.dbf
ERASE anytable.cdx

ERASE temp.dbc
ERASE temp.dct
ERASE temp.dcx
Ray Roper
Next
Reply
Map
View

Click here to load this message in the networking platform