>I am moving to VFP6 from FPW2.6 and to me, it is quite a steep learning curve and got caught in this problem. I am not dishearted yet.
>
>I have a grid in a form and has set only one table in dataenvironment. I haven't reset any of the default properties. I create a command button "Delete". Its code is
>
>set excl on
>goto 3 &&[it is the third record no in the table]
>delete
>pack
>
>and all I get is an error message "File must be opened exclusively". The table is created under VFP6. So where did I go wrong?
>
You have to either SET EXCLUSIVE ON before the USE statement, or USE
filename EXCLUSIVE to perform a PACK operation. Whether or not a file is opened for exclusive access is determined at the time the table is opened, not the current setting of SET EXCLUSIVE, as was the case with FPW.
>Many thanks for your anticipated solutions.