Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
USE AGAIN - no structural index?
Message
General information
Forum:
Visual FoxPro
Category:
Databases,Tables, Views, Indexing and SQL syntax
Environment versions
Visual FoxPro:
VFP 9 SP1
OS:
Windows XP SP2
Database:
Visual FoxPro
Miscellaneous
Thread ID:
01260325
Message ID:
01260332
Views:
12
>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
Previous
Reply
Map
View

Click here to load this message in the networking platform