Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Problem with index
Message
De
08/11/2002 08:01:02
Cetin Basoz
Engineerica Inc.
Izmir, Turquie
 
 
À
08/11/2002 03:27:16
Information générale
Forum:
Visual FoxPro
Catégorie:
FoxPro 2.x
Divers
Thread ID:
00720158
Message ID:
00720198
Vues:
15
>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 && FOR !VALID
>
>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
Çetin Basöz

The way to Go
Flutter - For mobile, web and desktop.
World's most advanced open source relational database.
.Net for foxheads - Blog (main)
FoxSharp - Blog (mirror)
Welcome to FoxyClasses

LinqPad - C#,VB,F#,SQL,eSQL ... scratchpad
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform