Solved

Back-up and restore frome within VB5

Posted on 1998-09-21
3
139 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
  • 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

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

Introduction In a recent article (http://www.experts-exchange.com/A_7811-A-Better-Concatenate-Function.html) for the Excel community, I showed an improved version of the Excel Concatenate() function.  While writing that article I realized that no o…
Enums (shorthand for ‘enumerations’) are not often used by programmers but they can be quite valuable when they are.  What are they? An Enum is just a type of variable like a string or an Integer, but in this case one that you create that contains…
Get people started with the process of using Access VBA to control Excel using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Excel. Using automation, an Access application can laun…
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…

864 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

Need Help in Real-Time?

Connect with top rated Experts

20 Experts available now in Live!

Get 1:1 Help Now