Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Table repair
Message
De
04/03/2015 16:58:30
 
 
À
03/03/2015 16:05:07
Information générale
Forum:
Visual FoxPro
Catégorie:
Base de données, Tables, Vues, Index et syntaxe SQL
Titre:
Versions des environnements
Visual FoxPro:
VFP 9 SP2
OS:
Windows Server 2012
Network:
Windows 2008 Server
Database:
MS SQL Server
Application:
Web
Divers
Thread ID:
01616172
Message ID:
01616235
Vues:
48
Hi, this works for me when a table is corrupted
Function REPARAR(TABLA)
Local LPATH,TTEMPO,RETO,ANTVALOR
ANTVALOR=Set("TableValidate")
RETO=.F.
LPATH=Getenv("TEMP")
TTEMPO=Addbs(LPATH)+Justfname(TABLA)
If HAGO_COPIA(TABLA,.F.)   && backup original table with DBFnnn extension

	Set TABLEVALIDATE To 0    && not fails when table is corrupted
	Try
		Use (TABLA) Alias reparada Exclusive In 0
		Select reparada
		Copy To (TTEMPO)    && copy correct records 
		Zap
		Append From (TTEMPO)
		Delete File (TTEMPO)
		Use
		RETO=.T.
	Catch To PROBLEMA
	Endtry
Endif
Set TABLEVALIDATE To ANTVALOR    
Return RETO
>Hi All,
>
>Can someone recommend a good table repair utility?
>
>Luke
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform