Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Deleting records from a table attached to a grid
Message
From
25/08/2004 19:14:35
 
 
To
25/08/2004 18:53:45
Paul Trimming
Lonely Pilgrim Shareware
Merstham, United Kingdom
General information
Forum:
Visual FoxPro
Category:
Databases,Tables, Views, Indexing and SQL syntax
Miscellaneous
Thread ID:
00936439
Message ID:
00936443
Views:
37
Hi Paul,

I suggest you forget about PACK, and SET DELETED ON in stead. PACK s not meant for everyday use, I rarely PACK more than once per year! If you need to PACK frequently, cursors are usually a much better approach.

>Hello,
>
>I am a Foxpro 6 beginner, and I have created a form with a grid that has a simple table attached to it. With the grid I have added records to the table. All OK so far.
>
>However, now I want to delete all the records from the table and from the grid by clicking button A, and then recommence adding records without restarting the form. This is where the problem starts.
>
>In the buttonclick event I have tried issuing the normal DELETE command, and then the PACK command, but I get a "File is open in another workarea" error with PACK, when I know that the table is not used anywhere else.
>
>Does Foxpro think the table is open elsewhere because it is still the recordsource for the grid??? Do I have to separate the table from the grid before issuing the PACK command (but this doensn't work either I think).
>
>Has anyone else come across a similar problem?
>
>Hopefully,
>Trimtrom
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform