PDA

Click to See Complete Forum and Search --> : advice on backup needed!


c_jeyasree
Jan 17th, 2000, 06:32 PM
friends,
i am using vb 6.0 and ms access 97;

for backup i have used:

compactdatabase <sourcefilename> <destination filename>

followed by

shell("pkzip "....)

i have 3 questions:

1. is there any way to check the return value of compactdatabase method.

2. since i have used dos utility(pkzip) for compression, there is a minimised instance after the zipping has taken place. how can i avoid this?

3. Is there any better utility available?
if i have to use "compress.exe", then i should use syncshell instead of shell. but the former requires additional DLL references. please guide me.

friendly,
jeyasree.

Clunietp
Jan 18th, 2000, 12:00 AM
1) Compactdatabase does not return a value, but will raise an error if unsuccessful

2) Use the WinExec API to execute a command line without leaving the app in the task list
Public Declare Function WinExec Lib "kernel32" Alias "WinExec" (ByVal lpCmdLine As String, ByVal nCmdShow As Long) As Long

3) There are some freeware compression OCXs (although not in ZIP format) that you can use. I have Eclipse Cabinet http://www.greeneclipsesoftware.com/eclipsecabinet.html ...it looks pretty nice, although I haven't had a need to compress anything lately....and it's free!

HTH

Tom



[This message has been edited by Clunietp (edited 01-18-2000).]