Solved

Reduce a DBF File Size

Posted on 2001-06-27
4
1,457 Views
Last Modified: 2006-11-17
I have attached dbf files in an access application. The contents of the dbf files are deleted daily and reloaded with fresh data.

The size of these files continues to grow. How can I reduce the size by compact ? or cleaning ? in vba code

Thanks

0
Comment
Question by:pnjones
  • 2
4 Comments
 
LVL 54

Expert Comment

by:nico5038
ID: 6233186
I would check the dbase application for an "external" compress. Thus you can issue a SHELL command from VBA to execute the compact.
Another option is to delete the file and to create a new copy and relink.

Nic;o)
0
 
LVL 6

Accepted Solution

by:
PsychoDazey earned 300 total points
ID: 6233457
I am not sure I understand your question, but I will take a stab at it.  Does running the compact method help when you have your database open?  If so, you can set up a db that will run the repair and compact procedures on any number of databases you specify, if you are interested, I can pass that info along to you.
If you are trying to compact another DB (Foxpro maybe?) I agree with Nico, except I would use the ShellEX function.  I also have the code for that.
I have an application that creates a new directory, based upon a variable, copies a file to it and kills the old file.
Please give me more info and I will be happy to assist with any of the methods I specified above.
0
 
LVL 1

Author Comment

by:pnjones
ID: 6234212
nico5038,

The dbf file was created in satellite forms and I cannot find a method to compress the file. Do you know of any generic compress, compact routines for dbf files ?

Thanks
0
 
LVL 1

Author Comment

by:pnjones
ID: 6269819
I used a derivative of your suggestion , I load empty files into a sub folder and copy them across before loading the data

Regards

PAt

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

In Debugging – Part 1, you learned the basics of the debugging process. You learned how to avoid bugs, as well as how to utilize the Immediate window in the debugging process. This article takes things to the next level by showing you how you can us…
In a multiple monitor setup, if you don't want to use AutoCenter to position your popup forms, you have a problem: where will they appear?  Sometimes you may have an additional problem: where the devil did they go?  If you last had a popup form open…
In Microsoft Access, learn different ways of passing a string value within a string argument. Also learn what a “Type Mis-match” error is about.
In Microsoft Access, learn the trick to repeating sub-report headings at the top of each page. The problem with sub-reports and headings: Add a dummy group to the sub report using the expression =1: Set the “Repeat Section” property of the dummy…

947 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

21 Experts available now in Live!

Get 1:1 Help Now