>I've always had problems deleting a record from an open table.
>
>Here's the code:
>
>
>dele
>gfile=juststem(dbf())
>use in &gfile
>use &gfile in 0 alias gfile exclusive
>select gfile
>pack
>use
>
>
>And I get error file is in use in the 4th line. *sigh*
>
>Help pls.
Hi Evelyn,
Perhaps the table is open somewhere else - by the same user, or by another user.
You should
not do a PACK every time you delete a record. This is slow, and it will not allow for shared access.
PACK is meant to be done (for example) once a month, in a maintenance routine.
Instead, use SET DELETED ON to hide deleted records.
Difference in opinions hath cost many millions of lives: for instance, whether flesh be bread, or bread be flesh; whether whistling be a vice or a virtue; whether it be better to kiss a post, or throw it into the fire... (from Gulliver's Travels)