Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations bkrike on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Fpt file grow big without reason?

Status
Not open for further replies.

GEMINI88

IS-IT--Management
Mar 23, 2001
12
HK
I create a file in the server with memo field. Foxpro creates a fpt file to store the memo content. Recently, I found that the fpt file grow to unreasonable big, up to 300MB. I pack the file and it sometimes works and drops to 500K. But it is hassle to call everyone to logout first.

Could anyone help? Thanks a lot.
 
I'm sure there must be times when there's nobody on the that table. You might create a program which checks the size of the table periodically and when it reaches a certain size, checks for when the table is free and automatically packs it. Depending on how long it generally takes, you might also need to create an error message to be sent to users when the table is locked to let them know about how long it will be.

I admit I'm talking a bit off the top of my head here, as I've never tried it myself, but I believe all the details are feasible.

Dave Dardinger
 
Dave, thanks.

I want to know more. Is it a bug of Foxpro or I have done something wrong?

Gemini

 
HI Gemini,
This is not a bug. This is not any mistake you have done also. Owing to OS requirement, FoxPro leaves some unused spaces while writing or deleteing & writing records in a memo file.

These spaces can be removed by issuing the command
PACK myTable MEMO when the deleted records still stay on.

When you issue the command PACK myTable, all the deleted records are removed from the table inclusive of the memo fields. These empty spaces are also removed.

Hope this helps you. :) ramani :-9
(Subramanian.G)
FoxAcc
ramani_g@yahoo.com
LET KNOW IF THIS HELPED. ENOUGH EXPERTS ARE HERE TO HELP YOU OUT! BEST OF LUCK :)
 
One thing to check is the average size of the data in your memo fields. Since the default blocksize of memo field pieces is 64, this may be too low. This has the effect that when data is added FP has to create a whole new memo field "string" (leaving the old one unused, for the next PACK), rather than simply adding to the current piece. See the "SET BLOCKSIZE Command" help topic for more information.

Rick
 
Ramani and Rick, thanks much. I have tried to set the blocksize and it works. The files doesn't grow as big as before and I write a small command to pack it weekly.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top