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!

pack a dbc

Status
Not open for further replies.

sncheong

Programmer
Jan 18, 2001
47
NZ
merry xmas all
i tried to do in a program and at the command window:-

clos all
open database dbc1 excl
pack database
validate database

but vfp6 just doesn't pack the deleted records. can anyone help pls? ta
 
Hi ta,

The PACK DATABASE command will remove deleted records from the .dbc itself. To remove deleted records from tables contained within the database you'll need to PACK them individually.

Jim
 
tks jim;
is there a way to speed up the individual table deletion - i have 7 huge tables in the dbc and each table is growing!
 
It might be a good idea to consider the need to PACK these HUGE tables. You could mark the records "inactive" and re-use these records when adding new ones.

Depending on the number (and size) of index keys, you may want to delete those first, PACK and then recreate the indexes. Of course if you are using the DBC RI or other persistent relationships, this must be done very carefully.

Rick
 
I do as rgbean suggests on my tables that encounter a lot of traffic (excessive additions and deletions). I add an index named deleted with a tag of deleted() in descending order. When I need to add a new record I simply apply the deleted index, go top, store the record number to a variable, gather the new information, undelete the record, and apply the previously active index. This process has worked very well for a long time for me without incident.

For the less active tables I have a reindex function which steps through each table packing and reindexing them.

I hope that helps!
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top