Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
PACK DATABASE???
Message
From
12/09/1997 13:18:58
 
 
General information
Forum:
Visual FoxPro
Category:
Other
Miscellaneous
Thread ID:
00049700
Message ID:
00049878
Views:
64
>>>How do you provide pack database routine inside a program? I've tried following which doesn't seem to work.
>>> CLOSE DATABASES ALL
>>> OPEN DATABASE mydb EXCLUSIVE
>>> PACK DATABASE
>>>When I check after issuing the CLOSE DATABASES ALL using DBUSED(), the mydb database seems to be still open. Then, OPEN DATABASE mydb EXCLUSIVE seems to be ignored and finally an error message for PACK DATABASE shows up with "Database must be opened exclusively". Any suggestions?
>>>
>>>TIA
>>>John
>>
>>John,
>> Look at a product called stonefield database toolkit. It will give you the tools to do a btter pack and rebuild of your indexes and will fit nicely into most applications..
>>
>>Why write the code for this type of procedure, when they already have it... For $250, you get the source code and the ability to removed deleted records from your database without loosing all the RI code involved.
>>
>>Thanx!
>>
>>Tony Miller
>>PTI
>
>Tony,
>
>Are you saying I can't PACK a database from my program and that I need to pay $250 to do this? I don't want to sound cheap and SDT might indeed be better for this and many other things but I can't imagine not being able to simply pack a database from VFP programs.
>
>John.

John,
What I am saying is this.. Pack should never be used on a database/data table, the prefered way even in 2.x was to:

1) Go out and copy all Non-deleted records to a temporary table
2) Delete the original table & any index files
3) Rename Temporary table to the name of the original table
4) Rebuild all the indexes.

Now, if you try to do this procedure, you will cause all kind of problems with your DBC.

Instead of having all these problems, plus the tedium of writing your own, I would think a $250 investment is easier than the time you'd spend redoing what they already have done..

This is my own 3 cents worth, but why reinvent the wheel when someone else has already done it, the people who pay me, don't pay me enough to write code like this, when someone else has done it, and I can reuse their stuff for a small price... Again, that is my 3 cents worth...

But then again, I am looking at using a Framework for my VFP apps development (VFE from Neon Software, Visual FoxFire from Micromega)...

Thanx!

Tony Miller
PTI
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform