Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
INDEXSEEK Bug?
Message
 
 
To
09/05/2002 07:57:00
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Title:
Miscellaneous
Thread ID:
00654373
Message ID:
00654690
Views:
16
I got the same results on VFP6 SP4.

>Could somebody explain the results of the following code:
>
>
>CREATE DATABASE temp
>CREATE TABLE anytable (pkey I PRIMARY KEY)
>SET MULTILOCKS ON
>CURSORSETPROP('Buffering',5)
>
>FOR n = 1 TO 10
>   INSERT INTO anytable (pkey) VALUES (n)
>	
>   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
>
>
>So INDEXSEEK doesn't work on buffered tables? Doesn't say that in the documentation anywhere that I can find. Makes the function more or less useless, doesn't it?
If it's not broken, fix it until it is.


My Blog
Previous
Reply
Map
View

Click here to load this message in the networking platform