Author | Topic: Pack problems | |
---|---|---|
Raffaele Lafratta | Pack problems on Mon, 27 Jul 2020 17:14:12 +0200 Hi all ( Sometimes )packing a dbf with pack command dbf becomes 4 Gb Anyone can help me ? Thanks in advance Raffaele | |
Jim Lee | Re: Pack problems on Mon, 27 Jul 2020 18:52:19 +0200 hi, > ( Sometimes )packing a dbf with pack command dbf becomes 4 Gb > Anyone can help me ? show us your DBESYS try COPY TO XXX FOR !DELETE() | |
Raffaele Lafratta | Re: Pack problems on Tue, 28 Jul 2020 10:09:26 +0200 Jim Lee scriveva il 27/07/2020 : > hi, > >> ( Sometimes )packing a dbf with pack command dbf becomes 4 Gb >> Anyone can help me ? > > show us your DBESYS > > try > COPY TO XXX FOR !DELETE() Thanks Jim This is my rddsys PROCEDURE dbeSys() /* * Adaption of Sorting order to hosting environment */ SET COLLATION TO ITALIAN IF ! DbeLoad( "FOXDBE", .T.) Alert( "FOXDBE not loaded", {"OK"} ) ENDIF IF ! DbeLoad( "CDXDBE", .T.) Alert( "CDXDBE not loaded", {"OK"} ) ENDIF IF ! DbeBuild( "DBFCDX", "FOXDBE", "CDXDBE" ) Alert( "Unable to build;" + ; "FOXCDX DatabaseEngine" , {"OK"} ) ENDIF DbeSetDefault( "DBFCDX" ) per uso contemporaneo con clipper DbeInfo( COMPONENT_DATA, FOXDBE_CREATE_2X, .T. ) DbeInfo( COMPONENT_DATA, FOXDBE_LOCKMODE , FOXDBE_LOCKMODE_AUTO ) DbeInfo( COMPONENT_DATA,FOXDBE_MEMOBLOCKSIZE,64) DbeInfo( COMPONENT_ORDER,DBE_LOCKMODE, LOCKING_EXTENDED) NUOVO DbeInfo( COMPONENT_ORDER,CDXDBE_MODE, CDXDBE_COMIX) DbeInfo( COMPONENT_DATA, FOXDBE_LIFETIME , 0 ) NUOVO DbeInfo(COMPONENT_DATA,FOXDBE_LOCKRETRY,5000000) DbeInfo(COMPONENT_ORDER,CDXDBE_LOCKRETRY,5000000) DbeInfo(COMPONENT_ORDER,CDXDBE_LOCKDELAY,15) | |
Jim Lee | Re: Pack problems on Tue, 28 Jul 2020 23:36:26 +0200 hi, > DbeInfo( COMPONENT_DATA, FOXDBE_CREATE_2X, .T. ) this is for FoxPro 2.x NOT Visual FoxPro which have .F. > DbeInfo( COMPONENT_DATA, FOXDBE_LOCKMODE , FOXDBE_LOCKMODE_AUTO ) as i saw COMIX it must be FOXDBE_LOCKMODE_CLIPPER or FOXDBE_LOCKMODE_2X > FOXDBE_LOCKRETRY > CDXDBE_LOCKRETRY since v1.9x default Value are correct > LOCKING_EXTENDED it is usefull when it work with right DBE Setting but will not work when wrong config. it will also fail when "other" Apps (not Xbase++) access DBF as it is not compatible btw. better "less" than "too much" DBE Settings > FOXDBE_LIFETIME , 0 YES, that is need in Network | |
Andreas Gehrs-Pahl | Re: Pack problems on Tue, 28 Jul 2020 18:10:34 -0400 Raffaele, >IF ! DbeBuild( "DBFCDX", "FOXDBE", "CDXDBE" ) > Alert( "Unable to build;" + ; > "FOXCDX DatabaseEngine" , {"OK"} ) >ENDIF >DbeSetDefault( "DBFCDX" ) Using the FOXDBE but naming the Compound DBE "DBFCDX" is confusing, but technically okay. Also, the "Alert()" function does refer to: "FOXCDX"! >// per uso contemporaneo con clipper If you use the DBFs concurrently with Clipper, you must use Clipper- compatible settings. Not all of the following settings are. >DbeInfo( COMPONENT_DATA, FOXDBE_CREATE_2X, .T. ) >DbeInfo( COMPONENT_DATA, FOXDBE_LOCKMODE , FOXDBE_LOCKMODE_AUTO ) It would be better to specify explicitly Clipper-compatible locking. If you use Comix, you should specify: DbeInfo(COMPONENT_DATA, FOXDBE_LOCKMODE, FOXDBE_LOCKMODE_CLIPPER) Unless you also use cmxFox52.obj in Clipper, then you need to specify: DbeInfo(COMPONENT_DATA, FOXDBE_LOCKMODE, FOXDBE_LOCKMODE_2X) >DbeInfo( COMPONENT_DATA,FOXDBE_MEMOBLOCKSIZE,64) This is the default setting, so it is redundant and not necessary. >DbeInfo( COMPONENT_ORDER,DBE_LOCKMODE, LOCKING_EXTENDED) NUOVO This will break Clipper-compatibility! >DbeInfo( COMPONENT_ORDER,CDXDBE_MODE, CDXDBE_COMIX) >DbeInfo( COMPONENT_DATA, FOXDBE_LIFETIME , 0 ) NUOVO Those are fine, if you use Clipper/Comix concurrently. >DbeInfo(COMPONENT_DATA,FOXDBE_LOCKRETRY,5000000) >DbeInfo(COMPONENT_ORDER,CDXDBE_LOCKRETRY,5000000) Those settings seem a little excessive. The default settings (100000) should be sufficient. >DbeInfo(COMPONENT_ORDER,CDXDBE_LOCKDELAY,15) This is the default setting, so it is redundant and not necessary. There is no PDR for Pack (or the FOXDBE) that describes your issue, but it could be related to the extended locking or concurrent use with Clipper, or something completely different. BTW, what version of Xbase++ do you use? As Jim mentioned, instead of using Pack/DbPack(), you could simply copy all (not deleted) records to a different table and then rename the tables and recreate the index files. This shouldn't take much longer than using Pack and it is probably safer. Hope that helps, Andreas Andreas Gehrs-Pahl Absolute Software, LLC phone: (989) 723-9927 email: Andreas@AbsoluteSoftwareLLC.com web: http://www.AbsoluteSoftwareLLC.com [L]: https://www.LinkedIn.com/in/AndreasGehrsPahl [F]: https://www.FaceBook.com/AbsoluteSoftwareLLC | |
Raffaele Lafratta | Re: Pack problems on Wed, 29 Jul 2020 09:24:45 +0200 Nel suo scritto precedente, Raffaele Lafratta ha sostenuto : > Jim Lee scriveva il 27/07/2020 : >> hi, >> >>> ( Sometimes )packing a dbf with pack command dbf becomes 4 Gb >>> Anyone can help me ? >> >> show us your DBESYS >> >> try >> COPY TO XXX FOR !DELETE() > > Thanks Jim > This is my rddsys > > PROCEDURE dbeSys() > > /* > * Adaption of Sorting order to hosting environment > */ > > SET COLLATION TO ITALIAN > > > > IF ! DbeLoad( "FOXDBE", .T.) > Alert( "FOXDBE not loaded", {"OK"} ) > ENDIF > > IF ! DbeLoad( "CDXDBE", .T.) > Alert( "CDXDBE not loaded", {"OK"} ) > ENDIF > > IF ! DbeBuild( "DBFCDX", "FOXDBE", "CDXDBE" ) > Alert( "Unable to build;" + ; > "FOXCDX DatabaseEngine" , {"OK"} ) > > ENDIF > > DbeSetDefault( "DBFCDX" ) > > per uso contemporaneo con clipper > > DbeInfo( COMPONENT_DATA, FOXDBE_CREATE_2X, .T. ) > DbeInfo( COMPONENT_DATA, FOXDBE_LOCKMODE , FOXDBE_LOCKMODE_AUTO ) > DbeInfo( COMPONENT_DATA,FOXDBE_MEMOBLOCKSIZE,64) > DbeInfo( COMPONENT_ORDER,DBE_LOCKMODE, LOCKING_EXTENDED) NUOVO > DbeInfo( COMPONENT_ORDER,CDXDBE_MODE, CDXDBE_COMIX) > > DbeInfo( COMPONENT_DATA, FOXDBE_LIFETIME , 0 ) NUOVO > > > DbeInfo(COMPONENT_DATA,FOXDBE_LOCKRETRY,5000000) > DbeInfo(COMPONENT_ORDER,CDXDBE_LOCKRETRY,5000000) > DbeInfo(COMPONENT_ORDER,CDXDBE_LOCKDELAY,15) Thanks Jim and Andreas I will try your suggestions !! |