Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Word seems to cause Adir failure...
Message
From
18/09/2001 23:56:33
 
 
To
All
General information
Forum:
Visual FoxPro
Category:
COM/DCOM and OLE Automation
Title:
Word seems to cause Adir failure...
Miscellaneous
Thread ID:
00558184
Message ID:
00558184
Views:
50
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...
Next
Reply
Map
View

Click here to load this message in the networking platform