Welcome To The Home Of The Visual FoxPro Experts  
home. signup. forum. archives. search. google. articles. downloads. faq. members. weblogs. file info. rss.
 From: Richard Conlan
  Where is Richard Conlan?
 
 New York - United States
 Richard Conlan
 To: Boudewijn Lutgerink
  Where is Boudewijn Lutgerink?
 Hoonaardstraat, Driel
 Netherlands
 Boudewijn Lutgerink
 Tags
Subject: RE: Why is it so hard to back up the database!?
Thread ID: 32959 Message ID: 33666 # Views: 4 # Ratings: 0
Version: Visual FoxPro 8 Category: Databases, Tables and SQL Server
Date: Monday, December 01, 2003 3:36:26 PM         
   


As far as I can tell the problem has nothing to do with Xceedzip...this is why I hate including code in posts....because people get to into addressing the code instead of the problem I am describing. Xceedzip, PKZip, Winzip -- all have the same problem. The problem is that they claim the file is in use...which implies that FoxPro is not correctly releasing it.

RMC

> > So, given the following...
> >
> >
> > * Close all open tables.
> > CLOSE DATABASES ALL
> >
> > * Build default file name.
> > strDefaultFilename = "Archive " + LTRIM( STR( YEAR( DATE() ) ) ) + LTRIM( STR( MONTH( DATE() ) ) ) + LTRIM( STR( DAY( DATE() ) ) )
> >
> > * Prompt the user for the archive file.
> > strPath = PUTFILE( "Archive:", strDefaultFilename, "ZIP" )
> >
> > * Make sure the user selected a file.
> > IF !EMPTY( strPath )
> >
> > * Fetch a reference to the main form.
> > frmMain = m->gobjGlobalData.GetMainForm()
> > strApplicationPath = m->gobjGlobalData.GetApplicationPath()
> >
> > WITH frmMain.XceedZip.
> > * Zip the current database files.
> > .ZipFilename = strPath
> > .AddFilesToProcess( strApplicationPath + "*.dbf" )
> > .AddFilesToProcess( strApplicationPath + "*.cdx" )
> > .AddFilesToProcess( strApplicationPath + "*.fpt" )
> > .AddFilesToProcess( strApplicationPath + "*.dcx" )
> > .AddFilesToProcess( strApplicationPath + "*.dbc" )
> > .AddFilesToProcess( strApplicationPath + "*.dct" )
> > intZipResult = Zip()
> > ENDWITH
> >
> > IF intZipResult = 0
> > MESSAGEBOX( "Archive created successfully.", MB_ICONINFORMATION )
> > ELSE
> > MESSAGEBOX( frmMain.XceedZip.GetErrorDescription(0, intZipResult), MB_ICONEXCLAMATION )
> > ENDIF
> > ENDIF
> >
> >
> > Sometimes the *.dcx, *.dbc, and *.dct get zipped up fine.
> > Sometimes it gets errors because they are in use.
> >
> > Thoughts?
> >
> > =(
> >
> > RMC
>
> Beats me. I don't use xceed zip. winzip works just fine for me so I can't give you a clue on this.
> Did you try another wildcard in the .AddFilesToProcess() function, like in:
> .AddFilesToProcess(*.d??)
>
> I guess that would theninclude the DBC, DCX, DCT and DBF files in one command.
>
> Boudewijn LutgeĀ®ink
> Boudewijn.Lutgerink@foxite.com
> The music, played at a wedding, reminds me every time to music played when soldiers march to the frontier... (Heinrich Heine)


ENTIRE THREAD

Archive Database Posted by Richard Conlan @ 11/18/2003 9:00:53 PM
RE: Archive Database Posted by Geoff Franklin @ 11/19/2003 1:05:52 PM
RE: Archive Database Posted by Richard Conlan @ 11/19/2003 3:10:36 PM
Archive Database -- Which files do I need? Posted by Richard Conlan @ 11/19/2003 10:31:13 PM
RE: Archive Database -- Which files do I need? Posted by Boudewijn Lutgerink @ 11/20/2003 7:21:33 AM
RE: Archive Database -- Which files do I need? Posted by Richard Conlan @ 11/20/2003 3:01:57 PM
RE: Archive Database -- Which files do I need? Posted by Richard Conlan @ 11/20/2003 3:56:33 PM
RE: Archive Database -- Which files do I need? Posted by Boudewijn Lutgerink @ 12/12/2003 9:21:42 AM
How do I back up the database? Posted by Richard Conlan @ 11/21/2003 8:36:04 PM
RE: How do I back up the database? Posted by Boudewijn Lutgerink @ 11/23/2003 7:29:28 AM
RE: How do I back up the database? Posted by Richard Conlan @ 11/24/2003 2:41:36 PM
RE: How do I back up the database? Posted by Boudewijn Lutgerink @ 11/25/2003 11:15:26 AM
RE: How do I back up the database? Posted by Richard Conlan @ 11/25/2003 4:28:27 PM
Why is it so hard to back up the database!? Posted by Richard Conlan @ 11/26/2003 2:45:55 PM
RE: Why is it so hard to back up the database!? Posted by Boudewijn Lutgerink @ 11/27/2003 1:09:19 PM
RE: Why is it so hard to back up the database!? Posted by Richard Conlan @ 12/1/2003 3:36:26 PM
RE: Why is it so hard to back up the database!? Posted by Craig Moore @ 12/1/2003 3:48:50 PM
RE: Why is it so hard to back up the database!? Posted by Richard Conlan @ 12/2/2003 7:03:55 PM
RE: Why is it so hard to back up the database!? Posted by Boudewijn Lutgerink @ 12/3/2003 8:06:27 AM
RE: Why is it so hard to back up the database!? Posted by Richard Conlan @ 12/11/2003 9:41:09 PM
RE: Why is it so hard to back up the database!? Posted by Boudewijn Lutgerink @ 12/12/2003 9:01:12 AM
RE: Why is it so hard to back up the database!? Posted by Richard Conlan @ 12/12/2003 2:53:07 PM