Solved

Reduce a DBF File Size

Posted on 2001-06-27
4
1,485 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

Live: Real-Time Solutions, Start Here

Receive instant 1:1 support from technology experts, using our real-time conversation and whiteboard interface. Your first 5 minutes are always free.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Overview: This article:       (a) explains one principle method to cross-reference invoice items in Quickbooks®       (b) explores the reasons one might need to cross-reference invoice items       (c) provides a sample process for creating a M…
I see at least one EE question a week that pertains to using temporary tables in MS Access.  But surprisingly, I was unable to find a single article devoted solely to this topic. I don’t intend to describe all of the uses of temporary tables in t…
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…
Polish reports in Access so they look terrific. Take yourself to another level. Equations, Back Color, Alternate Back Color. Write easy VBA Code. Tighten space to use less pages. Launch report from a menu, considering criteria only when it is filled…

813 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

16 Experts available now in Live!

Get 1:1 Help Now