Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Find out corrupted table in dbc
Message
De
03/09/2004 03:54:26
 
 
Information générale
Forum:
Visual FoxPro
Catégorie:
Autre
Divers
Thread ID:
00936469
Message ID:
00939063
Vues:
21
Dear Sir,

Accourding to your advise I made many efforts to make a subroutine of the follwoing codes but failed. Your following codes do not return corrupt table name from a database. How could I make a subroutine to get corrupted table name.

Please sir do not mind to tease you many time but I think this is only you who could help me in this difficult matter.
I hope you will reply.
CLOSE ALL
CLOSE DATABASES
OPEN DATABASE D:\SYSTEM\TABLES\ACCOUNT.DBC EXCLUSIVE

= adbobjects(laTableArray, "TABLE") && Put table names into an array

for i=1 to alen(latablearray) && loop through each table in the array
 mtablename=latablearray(i)   && pick up table name from array
 =opentable(mtablename) && attempt to open table
next x

PROCEDURE OPENTABLE
PARAMETERS M.TABLE

ON ERROR DO MYERROR WITH ERROR(),MESSAGE(),MESSAGE(1),PROGRAM(),LINENO()
USE (M.TABLE) IN 0
ON ERROR
ENDPROC

PROCEDURE MYERROR
PARAMETERS M.ERROR,M.MESSAGE,M.MESSAGE1,M.PROGRAM,M.LINENO

CLEAR
? 'Error number: ' + LTRIM(STR(m.error))
? 'Error message: ' + M.MESSAGE
? 'Line of code with error: ' + M.MESSAGE1
? 'Line number of error: ' + LTRIM(STR(m.lineno))
? 'Program with error: ' + m.program
WAIT
RETURN
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform