Hi
I have aproblem of using the command "pack". I usually wrote this word to permanently erase a record as I hit "delete button". But it always jumps out an error message "You have to open it in exclusive mode". Is there any extra sommands I miss or something I get worng. My code of "delete" button is as follows
sele table
set multilocks o
CURSORSETPROP("BUFFERING",3,'table1'
del
pac
begin tra
if tableupdate(.f.)=.f
rollbac
tablerevert(.f.
els
end tra
ski
end
How to fix it? please help
thanks
patrick

Re: about using the command "pack" by Eric

Eric
Sun May 16 07:16:05 CDT 2004

Hello, patrick!

You can only PACK tables that are opened in exclusive mode:
USE yourtable EXCLUSIVE
PACK

It's usually bad practice to PACK a table each time a record is deleted. You
can't use this technique in mutli-user applications and it can slow down the
performance of your app. Take a look at the SET DELETED ON | OFF command in
VFP help. This setting allows you to 'hide' deleted records. Run PACK code
only in your DB maintenance procedures
--
Eric den Doop
www.foxite.com - The Home Of The Visual FoxPro Experts - Powered By VFP8