Solved

Back-up and restore frome within VB5

Posted on 1998-09-21
3
144 Views
Last Modified: 2010-04-30
Is there an OCX which make it possible to make back-up's from within VB5. So it must be possible to back-up and restore the databases from my application
0
Comment
Question by:rossel
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
3 Comments
 
LVL 12

Expert Comment

by:mark2150
ID: 1435920
Umm, dunno if I'd use BACKUP/RESTORE that comes with DOS/Windows.

Are you trying to go to floppies, tape, LAN or duplicate on disk?

Simplest would be to use the database compaction function in Access and save old version for later. This gives you a backup and cleans up database at same time.

Call busy("Please wait," + vbCrLf + "Repairing Database" + vbCrLf + "DO NOT INTERRUPT!")
'
On Error GoTo skipkill
Kill "ltdata1.mdb"
DBEngine.RepairDatabase "ltdata.mdb"
Name "ltdata.mdb" As "ltdata1.mdb"
Call busy("Please wait," + vbCrLf + "Compacting Database" + vbCrLf + "DO NOT INTERRUPT!")
'
DBEngine.CompactDatabase "ltdata1.mdb", "ltdata.mdb"
Call unbusy
'
reply = MsgBox("Database maintenance/compression complete, old data file is: LTDATA1.MDB", vbOKOnly, "Database Maintenance")
GoTo drain
' =================
'
' Here on file not exist on kill
'
skipkill:
Resume Next
' =================
'
drain:

0
 
LVL 12

Expert Comment

by:mark2150
ID: 1435921
You could also use PKZIP/PKUNZIP (or WINZIP) for same task.

M
0
 
LVL 5

Accepted Solution

by:
chewhoung earned 50 total points
ID: 1435922
If you want a FREE OCX for zipping and unzipping, here's one:
http://www.download.com/PC/Result/TitleDetail/0,4,0-54622,1000.html

or search ZIP at:
http://www.download.com/PC/Activex/0,271,0-0,00.html
0

Featured Post

[Webinar] Code, Load, and Grow

Managing multiple websites, servers, applications, and security on a daily basis? Join us for a webinar on May 25th to learn how to simplify administration and management of virtual hosts for IT admins, create a secure environment, and deploy code more effectively and frequently.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

I’ve seen a number of people looking for examples of how to access web services from VB6.  I’ve been using a test harness I built in VB6 (using many resources I found online) that I use for small projects to work out how to communicate with web serv…
You can of course define an array to hold data that is of a particular type like an array of Strings to hold customer names or an array of Doubles to hold customer sales, but what do you do if you want to coordinate that data? This article describes…
As developers, we are not limited to the functions provided by the VBA language. In addition, we can call the functions that are part of the Windows operating system. These functions are part of the Windows API (Application Programming Interface). U…
Show developers how to use a criteria form to limit the data that appears on an Access report. It is a common requirement that users can specify the criteria for a report at runtime. The easiest way to accomplish this is using a criteria form that a…

734 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question