>Hi everyone,
>
>we have a strange problem with index and compatibility between VFP and FPD.
>Conditions:
>FoxPro 26.6/DOS, code page 852
>VFP 7.0/SP2, code page 1250
>
>The problem is with indexes with clause FOR. When index is created in FPD, SEEK is working correctly. Then I open same table in VFP and change index (reindex or delete and append new record). Finally open table in FPD and SEEK working incorrect.
>
>Here is code to reproduce problem:
>
>CLEAR
>SET SAFETY OFF
>SET NEAR ON
>SET EXACT OFF
>IF !FILE("TEST.DBF")
> CREATE TABLE ("TEST.DBF") (name C(4), id1 C(1), id2 C(1), Valid L)
> INSERT INTO (DBF()) VALUES ("Adam","X"," ",.F.)
> INSERT INTO (DBF()) VALUES ("Dave","X"," ",.F.)
> INSERT INTO (DBF()) VALUES ("Mark","X"," ",.T.)
> INSERT INTO (DBF()) VALUES ("John","X"," ",.F.)
> INDEX ON name+id1+id2 TAG name FOR !VALID
> USE
>ENDIF
>
>USE ("TEST.DBF") ORDER name EXCL
>#IF "WINDOWS" $ UPPER(VERSION())
> INDEX ON name+id1+id2 TAG name FOR !VALID
>#ENDIF
>
>? SEEK("DaveX ")
>? SEEK("DaveX")
>USE
>
>
>Step by step to reproduce problem:
>1. Run this code in FPD.
>2. Both SEEK return .T.
>3. Start VFP and run same code in same directory again.
>4. Both SEEK return .T.
>5. Start FPD and run same code
>6. First SEEK return F. and second .T.
>
>When you modify code and change index - without clause FOR
>
>INDEX ON name+id1+id2 TAG name
>
>everything is o.k.
>
>I thing, the problem is in clause FOR.
>
>Do you know any solution ?
>
>MarianL
#IF !("WINDOWS" $ UPPER(VERSION()))
INDEX ON name+id1+id2 TAG name FOR !VALID
#ENDIF
IOW do not touch 2.x indexes under VFP if you would continue to use under 2.x. If you do recreate or reindex under fox2x.
Cetin