Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Word seems to cause Adir failure...
Message
De
18/09/2001 23:56:33
 
 
À
Tous
Information générale
Forum:
Visual FoxPro
Catégorie:
COM/DCOM et OLE Automation
Titre:
Word seems to cause Adir failure...
Divers
Thread ID:
00558184
Message ID:
00558184
Vues:
49
Hi All,

In my application the end user has the ability to view a file in Word..Then when exiting I create an automatic backup to 1 of 7 directories based on where he last backup to. code is below. When they exit if they have opened word the backup fails with an file open error on whatever the first file is that Adir returns. Can you help? Thanks in Advance.
Cecil...

use ..\data\sysprefs
nBack=sysprefs.lastbackup +1
if nBack < 7
repl sysprefs.lastbackup with nBack
else
repl sysprefs.lastbackup with 0
endif
messagebox("Backing up data please wait",64,"Back Up")
cBack="\frontsol\backup\"+ltrim(str(nBack))+"\" && \frontsol\backup\1, \frontsol\backup\2 etc...
*!clf!* New routine for backups...
nDbfs = Adir(aDbfs,"..\data\*.dbf")
close databases all && Close all open databases
close tables all && Close all open tables
clear
for i = 1 to nDbfs
cFile = aDbfs(i,1)
@ 14,10 say "Backing up "+ left(cFile+space(25),25)
cFile2 = "..\data\"+cFile
use (cFile2) in 0 exclusive
nRec = Reccount()
@ 15,10 say "Creating "+ left(cBack+cFile+space(50),50)
copy to (cBack+cFile)
use (cBack+cFile)
if reccount()<>nrec
@ 16,10 say 'Error in table '+cFile
endif
use
endfor
*!clf!* Will finally back it up...
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform