Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
How to get list of all indexes of table
Message
From
02/06/1998 03:04:04
Cetin Basoz
Engineerica Inc.
Izmir, Turkey
 
General information
Forum:
Visual FoxPro
Category:
Other
Miscellaneous
Thread ID:
00103725
Message ID:
00103884
Views:
28
>I need to get list of all indexes which are in CDX file?
>and index' expresion and name of them.
>How it is possible?
>
>Giedrius
Hi Giedrius,
This is from my support.prg :
function save_dictionary
lParameters cDataPath
close database
mkdir temp  && A frequently used dir
mkdir struc && Structure keep dir
=adir(dbase,cDataPath+"\*.dbf")
set safe off
create table struc\dbftags ;
	(filename c(12),tag c(10),key m(10),filter m(10),desc l(1),unique l(1))
create table struc\strulist ;
	(filename c(8),field_name c(10),field_type c(1),field_len n(3),field_dec n(3))
for db=1 to alen(dbase,1)
	dbname=left(dbase[db,1],at(".",dbase[db,1])-1)
	IF DBNAME="STRULIST" or DBNAME="DBFTAGS" or dbname=sys(2005)
	   LOOP
	ENDIF	
	select 0
	use (dbname)
	copy structure extended to temp\laststr
	select strulist
	append from temp\laststr
	replace all filename with dbname for empty(filename)
	select (dbname)
	for tg=1 to tagcount()
		insert into dbftags values ;
			(dbname,tag(tg,dbname),;
			key(tg,dbname),IIF(EMPTY(ALLTRIM(sys(2021,tg,dbname))),"",ALLTRIM(sys(2021,tg,dbname))),;
			descending(tg,dbname),unique(tg,dbname)) 
	endfor
	use
endfor
close database
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
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform