473,398 Members | 2,188 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,398 software developers and data experts.

backup and recovery

13
hello Veena,

i am using MS-Access as Backend can you explain how i can apply backup and recovery in my project?

Thanking You
Rathiga
Sep 5 '07 #1
2 1180
QVeen72
1,445 Expert 1GB
Hi,

I had already replied this in ur previous thread:

Hi,

If MS-Access, then it's quite Simple, Copy the .mdb Access File using "FileCopy":
Check this :

For Back Up

Code: ( vb )
If Dir("C:\BackUp\MyDB.mdb", vbDirectory) <> "" Then
'If Already Exisits then Delete It
Kill "C:\BackUp\MyDB.mdb"
End If
FileCopy App.Path & "\MyDB.mdb", "C:\BackUp\MyDB.mdb"


For Restore :


Code: ( vb )
If Dir("C:\BackUp\MyDB.mdb", vbDirectory) <> "" Then
If Dir(App.Path & "\MyDB.mdb", vbDirectory) <> "" Then
'Remove Current Working DB
Kill App.Path & "\MyDB.mdb"
End If
FileCopy "C:\BackUp\MyDB.mdb", App.Path & "\MyDB.mdb"
Else
Msgbox "No Back Up Database Found"
Exit Sub
End If


Change this App.Path & "\MyDB.mdb" to ur Variable/Actual Database Name/Path Name

Note Before doing any Back-Up / Restore Operations u have to "Close All the Connections of the Database" in the Code. otherwise u cannot do the file copy...


REgards
Veena
Sep 5 '07 #2
Ali Rizwan
925 512MB
Hi,

I had already replied this in ur previous thread:

Hi,

If MS-Access, then it's quite Simple, Copy the .mdb Access File using "FileCopy":
Check this :

For Back Up

Code: ( vb )
If Dir("C:\BackUp\MyDB.mdb", vbDirectory) <> "" Then
'If Already Exisits then Delete It
Kill "C:\BackUp\MyDB.mdb"
End If
FileCopy App.Path & "\MyDB.mdb", "C:\BackUp\MyDB.mdb"


For Restore :


Code: ( vb )
If Dir("C:\BackUp\MyDB.mdb", vbDirectory) <> "" Then
If Dir(App.Path & "\MyDB.mdb", vbDirectory) <> "" Then
'Remove Current Working DB
Kill App.Path & "\MyDB.mdb"
End If
FileCopy "C:\BackUp\MyDB.mdb", App.Path & "\MyDB.mdb"
Else
Msgbox "No Back Up Database Found"
Exit Sub
End If


Change this App.Path & "\MyDB.mdb" to ur Variable/Actual Database Name/Path Name

Note Before doing any Back-Up / Restore Operations u have to "Close All the Connections of the Database" in the Code. otherwise u cannot do the file copy...


REgards
Veena
If we use fso.copyfile then file is copied whether it is open or close.
and i m also using fso.copyfile
Sep 5 '07 #3

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

Similar topics

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...
3
by: A.M. de Jong | last post by:
Hi, Every day we perform a full database backup. (during the night). Since we need no "additional" backups we had the problem that the transaction log file grows and grows. Therefore now just...
3
by: Tim Morrison | last post by:
MSDE2000 I have an application in which I am running a TSQL command of BACKUP DATABASE and RESTORE DATABASE for the backup and restore commands for my application. For testing purposes, i did the...
2
by: Matt | last post by:
I run SQL Server 2000 and use thier database maintenance plans to backup my databases. My questions is what happens if a change is being made to a database table while a backup is running? Should I...
3
by: Raquel | last post by:
I am a newbie to UDB and reading the backup processes on UDB which look pretty good to me. Now, if these good backup and recovery procedures are already available 'within' UDB, what extra...
9
by: Stanley Sinclair | last post by:
I just brought a new small server online. It has two disks in RAID1 (mirrored) for the operating system and logs and DB2 DBMS. DB2 data on a separate RAID 5EE array on four disks. (IBM ServeRAID...
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......
2
by: scott s | last post by:
Hello all, I was just awarded the job of maintaing the database server for our company. I have basically ZERO experience using MS SQL Server 2000. Can anyone point me in the direction of a good...
2
by: clilush | last post by:
I've been working with db2 8.2fp14 for over a year now and was wondering what is a "standard" way of doing a backup to provide 24/7 operations with disaster recovery capabilities? My thoughts were...
5
by: Roger | last post by:
backup log testdb with truncate_only DBCC SHRINKFILE (testdb_log, 100) WITH NO_INFOMSGS backup database testdb to disk = '\\DC01\Backups\DB01\testdb.bak' with init and does the shrinkfile...
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: 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?
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
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
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...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...

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.