Stuart McLachlan
stuart at lexacorp.com.pg
Wed Apr 2 23:46:26 CST 2003
On 2 Apr 2003 at 21:11, Rocky Smolin - Beach Access S wrote: > Dear List: > > I get Error 70: Permission Denied when I try to execute: > > FileCopy gstrDatabaseName, varFileName > > where gstrDatabaseName contains the full valid path of the current back end and varFileName contains the full path and file name of the target. What am I doing wrong? > > I'm trying to give the user a way to make a backup copy of their database. Is there a better way? > Filecopy won't copy a file while it is open R/W by an application (which the current database is). The DOS Copy command will so try doing it with a Shell() instead of using Filecopy. But you really don't want anyone else in the BE while you are copying it!) The safest way is to only do the copy when no-one else is in the BE. To do that, close any connections to it in the users front end and use the Filecopy. An Error 70 will then serve as a warning that someone else is still using the BE and the backup can't be made safely. -- Stuart McLachlan Lexacorp Ltd Application Development, IT Consultancy http://www.lexacorp.com.pg