Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Corrupted dbf names in txt file
Message
 
À
11/01/2007 09:22:49
Information générale
Forum:
Visual FoxPro
Catégorie:
Base de données, Tables, Vues, Index et syntaxe SQL
Versions des environnements
Visual FoxPro:
VFP 9 SP1
OS:
Windows XP SP2
Network:
Windows XP
Database:
Visual FoxPro
Divers
Thread ID:
01184495
Message ID:
01184541
Vues:
17
>Dear Sir,
>
>All is working fine with your modified procedure.
>Now I want to display all corrupted dbf names into single messagebox.
>For this I modified your codes as follows.
>
>if x<>0 && Possible table corruption
>	local lnhandle,ix,lcStr
>	do case
>   	case "corrupt"$message()
>             lcStr = "Table "+m.table+" is corrupt!"
>	case "does not exist"$message()
>             lcStr = "Table "+m.table+" does not exist"
>	case x=1705 or "cannot access" $ message()
>             lcStr = Cannot access table "+m.table
>	otherwise
>             lcStr = Cannot access table "+m.table+": "+message()+"!"
>	endcase
>        STRTOFILE(lcStr+CRLF, [c:\BadDBF.TXT], 1)
>        MESSAGEBOX(lcStr+CRLF) && I wrote this line
>   *     CLOSE ALL
>    *    quit
>endif
>
>But it shows error messages equal to number of corrupted dbf files.
>An other question if above procedure find any corrupted or not existes dbf then exe file must quit.
>
>Please help again


Tariq, keep put all in that file, after testing all files do:
.....
FOR  ....
     OpenFile(.....)
NEXT
IF NOT EMPTY(SYS(2000,[c:\BadDbf.TXT]))
   MessageBox(FILETOSTR([c:\BadDbf.TXT])
ENDIF
.....
That way you will have a bad files stored in file and you will bring message to user.
Against Stupidity the Gods themselves Contend in Vain - Johann Christoph Friedrich von Schiller
The only thing normal about database guys is their tables.
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform