Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
USE AGAIN - no structural index?
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Base de données, Tables, Vues, Index et syntaxe SQL
Versions des environnements
Visual FoxPro:
VFP 9 SP1
OS:
Windows XP SP2
Database:
Visual FoxPro
Divers
Thread ID:
01260325
Message ID:
01260332
Vues:
13
>I have a free table. The table has a structural index.
>
>For some reason, when I
>
>USE MyTable AGAIN ALIAS "MyAlias" IN 0
>
>I do not see any of my structural indexes for "MyAlias"
>
>This came as a complete surprise - and the help file says structural indexes should be available with USE AGAIN
>
>Has anyone else come across this?
>
>TIA
>Michael

Michael,

Will this code work for you as you expect?
CLOSE TABLES all
CLEAR
CREATE TABLE c:\yy (fld1 c(10), fld2 c(10))
FOR ia=1 TO 100
	INSERT INTO yy VALUES (PADL(ia,10,"0"), "record"+TRANSFORM(ia))
ENDFOR
INDEX on fld1 TAG cdxindex
INDEX on fld1 TO c:\yy1.idx
USE 

* choose .f./.t. here to see the difference

IF .f.  && both cdx, and idx indexes available
	USE c:\yy INDEX c:\yy1
	USE (DBF()) IN 0 AGAIN ALIAS _1

else    && only cdx index available
	USE c:\yy
	USE (DBF()) IN 0 AGAIN ALIAS _1
endif
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform