?
Solved

Reduce a DBF File Size

Posted on 2001-06-27
4
Medium Priority
?
1,637 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 900 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

Get your Disaster Recovery as a Service basics

Disaster Recovery as a Service is one go-to solution that revolutionizes DR planning. Implementing DRaaS could be an efficient process, easily accessible to non-DR experts. Learn about monitoring, testing, executing failovers and failbacks to ensure a "healthy" DR environment.

Question has a verified solution.

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

The Windows Phone Theme Colours is a tight, powerful, and well balanced palette. This tiny Access application makes it a snap to select and pick a value. And it doubles as an intro to implementing WithEvents, one of Access' hidden gems.
Microsoft Access has a limit of 255 columns in a single table; SQL Server allows tables with over 255 columns, but reading that data is not necessarily simple.  The final solution for this task involved creating a custom text parser and then reading…
In Microsoft Access, learn how to “cascade” or have the displayed data of one combo control depend upon what’s entered in another. Base the dependent combo on a query for its row source: Add a reference to the first combo on the form as criteria i…
Do you want to know how to make a graph with Microsoft Access? First, create a query with the data for the chart. Then make a blank form and add a chart control. This video also shows how to change what data is displayed on the graph as well as form…

864 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