Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
DBC Property field
Message
De
28/02/2002 03:48:03
 
 
À
27/02/2002 19:19:20
Christopher Henry
Quickstart Systems, Inc.
Dallas, Texas, États-Unis
Information générale
Forum:
Visual FoxPro
Catégorie:
Base de données, Tables, Vues, Index et syntaxe SQL
Divers
Thread ID:
00626111
Message ID:
00626212
Vues:
10
>Does anyone know how to extract the index information from the PROPERTY field in the data dictionary so that I can write a routine to rebuild my indexes?
>
>Thank you.

Christopher,

As far as I can see, that info is not in the dbc.

There are a few ways to retrieve it

(1) vfp7 : ataginfo()

(2) vfp6: ataginfo like
use SomeTable
dime ti[1]
? GetTagInfo(@ti)


*--------------------------------------------------------------------------
function	GetTagInfo(ti, WorkAreaOrAlias)
	
	if( empty(WorkAreaOrAlias) )
		WorkAreaOrAlias = select(0)
	endif
	
	local i
	
	i = 1
	
	if( !empty(cdx(1, WorkAreaOrAlias)) )
		for i = 1 to tagcount(cdx(1, WorkAreaOrAlias), WorkAreaOrAlias)
			dime ti[i, 6]
			
			ti[i, 1] = tag(cdx(1, WorkAreaOrAlias), i, WorkAreaOrAlias)
			ti[i, 2] = iif(Primary(i, WorkAreaOrAlias), ;
							'P', ;
							iif(Candidate(i, WorkAreaOrAlias), ;
								'C', ;
								iif(Unique(i, WorkAreaOrAlias), ;
									'U', ;
									'R' ;
								   ) ;
							   ) ;
						   )
			ti[i, 3] = sys(14, i, WorkAreaOrAlias)
			ti[i, 4] = sys(2021, i, WorkAreaOrAlias)
			ti[i, 5] = iif( !descending(i, WorkAreaOrAlias), 'ASCENDING', 'DESCENDING')
			ti[i, 6] = idxcollate(i, WorkAreaOrAlias)
		endfor
	endif
	
	return (i-1)
endfunc
*---------------------------------------------------------------------------
(3) analyze the cdx file with fopen()
Gregory
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform