Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
VFP6 and script.filesystemobject problems
Message
De
19/01/2000 09:59:24
Daniel Murphy
National Auto Finance, Inc.
Jacksonville, Floride, États-Unis
 
 
À
Tous
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Titre:
VFP6 and script.filesystemobject problems
Divers
Thread ID:
00319866
Message ID:
00319866
Vues:
38
Does anyone know why these lines of code wont work?
What happens is.. The filesystemobject is created fin and the 2 for loops start and the INSERT command works the first time. But after the INSERT it totally hangs... DEAD VFP6! If I dont have the INSERT statement in there it works fine. So it must have something to do with the combination between using the filesystemobject and trying to use the SQL - INSERT command. I must be doing something fundamentally wrong or have found an obsure bug. I appreciate all your feedback in advance.

****
*The purpose of this prg is to
*find all of the free tables in our class system
*
*1. Find all tables in our system
*2. Find all tables in our DBC's
*compare lists
SET STEP ON
CLOSE ALL
cClassDir = "e:\class\"
cSaveDir = "e:\data\findfree\"
CREATE TABLE (cSaveDir +"classtables") ;
(tablename c(15), ;
tablepath C(30) ,;
dbcname C(30) ,;
lastaccess D ,;
InDBC L)
curtable=""
***Create filesystem object
lofilesystem=createobject("scripting.filesystemobject")
lofolder=lofilesystem.getfolder(cClassDir)
***Loop throiugh all subfolders
FOR EACH losubfolder IN loFolder.SubFolders
FOR EACH lofile IN losubfolder.files
IF lofilesystem.GetExtensionName(lofile.name) = "DBF"
INSERT INTO classtables (;
tablename,;
tablepath,;
lastaccess,;
InDBC;
) VALUES (;
lofile.name,;
lofile.path,;
lofile.DateLastAccessed,;
.F.)
ENDIF
ENDFOR
ENDFOR
INDEX ON tablename TAG tablename
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform