473,395 Members | 1,656 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,395 software developers and data experts.

backup vb script

hi, am i being thick....
seen on another post from the past what looks like a simple but great scrip to put on 'as described' on your main form n the event 'on close'

Expand|Select|Wrap|Line Numbers
  1. Dim SourceFile, DestinationFile
  2.        SourceFile = "C:\TestDir\Test.mdb"          ' Define source file name.
  3.       DestinationFile = "C:\TestDir\Test2.mdb"    ' Define target file name
  4.       FileCopy SourceFile, DestinationFile    ' Copy source to target.
but when i try it i get a runtime 70 error, access not permited??
cheers
Jan 22 '08 #1
3 2557
ADezii
8,834 Expert 8TB
hi, am i being thick....
seen on another post from the past what looks like a simple but great scrip to put on 'as described' on your main form n the event 'on close'

Expand|Select|Wrap|Line Numbers
  1. Dim SourceFile, DestinationFile
  2.        SourceFile = "C:\TestDir\Test.mdb"          ' Define source file name.
  3.       DestinationFile = "C:\TestDir\Test2.mdb"    ' Define target file name
  4.       FileCopy SourceFile, DestinationFile    ' Copy source to target.
but when i try it i get a runtime 70 error, access not permited??
cheers
You cannot copy the Database if you are currently working in it.
Jan 22 '08 #2
You cannot copy the Database if you are currently working in it.
thought so, but reading the other thread, it sounding like they could do it.
cheers anyway
Jan 22 '08 #3
NeoPa
32,556 Expert Mod 16PB
You could think of triggering a Cmd Script (.Cmd file) in your OnClose event that schedules a copy for ten seconds hence.
As scheduled tasks typically have limited access to the network though, it might be more prudent simply to start the copy job directly but with a command that would give a short delay running before the copy itself.
Jan 23 '08 #4

Sign in to post your reply or Sign up for a free account.

Similar topics

3
by: James | last post by:
HI, I'm looking for a script that will allow users/admins to have a one click backup solution for a MYSQL Database.. 'BACK DATABASE' button, click and its done... The a restore option, that...
4
by: Neil | last post by:
Hi, I hope this question isn't too far off topic....I'm almost at my wits end trying to figure this out. I have a Mysql database and I wish to automate the backup of the database because I...
1
by: Andrew E | last post by:
I just took over DBA responsibilities for an Oracle 8i database running on Linux. Although I've been working with relational databases for some time, I'm a bit green on Oracle so forgive me. My...
7
by: Dirk McCormick | last post by:
Hi, I am writing a remote update app, and I'd like to programmatically backup the SQL Server 2000 database before running the SQL files over it. Can anyone tell me a command that does a hot backup...
1
by: gcetti | last post by:
Can anyone recommend backup procedures for a SQL Server/MSDE product? We have upgraded our program from Access to SQL & before we could just tell our customers what .mdb files to include on their...
7
by: Toralf Kirsten | last post by:
Hi, we are using DB2 on Fedora We try to backup the datbases automatically every day (night). For this purpose, I wrote two scripts, a shell (bash) and a sql script. The shell script set the...
3
by: ChrisWinterscheid | last post by:
We are running DB2 8.1 on AIX 5.2. DB2level shows: DB21085I Instance "db2inst1" uses "32" bits and DB2 code release "SQL08016" with level identifier "02070106". Informational tokens are "DB2...
0
by: vhernz | last post by:
Hi, I am new in MSSQL and recently encountered a problem in backing up the database. Here is the scenario 1. There is an schedule backup everyweek which overwrite the backup file everytime...
2
by: m19peters | last post by:
We have a script that I had to rework a little bit for 2005 that does a full backup for every database on the server... For some reason on some nights the script does not backup all databases......
0
by: glubber | last post by:
I have a cronned perl script that runs on a different server. when I try to restore it to the server below things dont copy across correctly. the target server is described below. debian 4.0...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.