A small app to backup a predefined file to zip disk

tricks801
tricks801 used Ask the Experts™
on
I would like to backup a DB (filename and location never change)  to a zip disk using the current date as a naming scheme. Specifically, I would like this to be a stand alone executable.

Needs to have error checking such as disk full (upon reaching capacity, allow user to delete oldest files), duplicate file names(if the app was used twice in one day alert user). Also need information about how to create a status bar. Familiar with VB, but not with this type of operation, so I really just need to know the objects needed or an example to reference.
Comment
Watch Question

Do more with

Expert Office
EXPERT OFFICE® is a registered trademark of EXPERTS EXCHANGE®
Commented:
I'd do the database backup with t-sql ...
The rest is pretty standard. Lemme know if this works through ADO, Im just hypothesizing here..

How to create a database backup (Transact-SQL)
To create a database backup

Execute the BACKUP DATABASE statement to create the database backup, specifying:
The name of the database to back up.


The backup device where the database backup will be written.
Optionally, specify:
The INIT clause to overwrite the backup media, and write the backup as the first file on the backup media. If no existing media header exists, one is automatically written.


The SKIP and INIT clauses to overwrite the backup media even if there are either backups on the backup media that have not yet expired, or the media name does not match the name on the backup media.


The FORMAT clause when using media for the first time to completely initialize the backup media and rewrite any existing media header.
The INIT clause is not required if the FORMAT clause is specified.



Important  Use extreme caution when using the FORMAT or INIT clauses of the BACKUP statement, as this will destroy any backups previously stored on the backup media.


Examples
This example backs up the entire MyNwind database to tape:

USE MyNwind
GO
BACKUP DATABASE MyNwind
   TO TAPE = '\\.\Tape0'
   WITH FORMAT,
   NAME = 'Full Backup of MyNwind'
GO

Commented:
I would use the FileSystemObject as a starting point for your app.

Set a reference to Microsoft Scripting Runtime. Then declare a variable..

Dim FSO as new FileSystemObject


use the Object browser (F2) to view available props/methods it gives (under Scripting)
PLEASE DO NOT ACCEPT THIS COMMENT AS AN ANSWER!

No comment has been added lately, so it's time to clean up this TA.
I will leave a recommendation in Community Support that this question is:
- points to mccainz2
Please leave any comments here within the
next seven days.

Commented:
Finalized as proposed

modulo

Community Support Moderator
Experts Exchange

Do more with

Expert Office
Submit tech questions to Ask the Experts™ at any time to receive solutions, advice, and new ideas from leading industry professionals.

Start 7-Day Free Trial