Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Opening all dbfs in a directory
Message
De
19/10/2013 08:35:49
 
 
À
18/10/2013 15:19:56
Information générale
Forum:
Visual FoxPro
Catégorie:
Autre
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:
01585571
Message ID:
01585853
Vues:
91
>
LOCAL lnI, laDbfs[1]
>
>CREATE CURSOR badTables ;
>( ;
>    cName     c(40), ;
>    cMessage  c(200) ;
>)
>
>SELECT 0
>ADIR(laDbfs, "*.DBF")
>
>ON ERROR INSERT INTO badTables VALUES(laDbfs[lnI,1], MESSAGE())
>FOR lnI = 1 TO ALEN(laDbfs,1)
>    USE (laDbfs[lnI,1])
>NEXT
>ON ERROR
>
>SELECT badTables
>GOTO TOP
>BROWSE NOWAIT
>CANCEL
>
Rick

it is bad habit/coding to use a global vfp setting without resetting it to its previous. The use of 'ON ERROR' in this function as you advertize should be recoded to my opinion.

Rgds,

Koen
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform