Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Cannot access the selected table
Message
From
15/09/1998 08:04:07
 
 
To
11/09/1998 23:59:18
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
00135759
Message ID:
00136655
Views:
16
>Hi,
>I open a free table exclusively. & have the datasource of text boxes linked to the table for editing. I've also included a previous, next, last, first, add & delete buttons.
>
>When ever I issue a pack & then close all command this error shows up - cannot access selected the table.
>
>Anyone knows the prob.
>
>Thanks
>
>Andrew

Do you open the tables in the data environment of the form ? And do you still have the form open when you issue CLOSE ALL ? In that case, when the form is destroyed, it tries to close the table when it gets released. (Actually somewhat later, see "Event Firing Sequence" in Help.)

Don't close the table yourself, because it will be closed automatically. (If the table was open before you started the form, it will be left open thought, and it still needs to be open when the form closes.)

Another way is to open AND close the table yourself (open it before starting the form, and close after it is released, or put the code in the init() and destroy() event of the data environment). You must set the AutoOpenTables and AutoCloseTables of the dataenvironment to .F. too.

Marc Van Riet
Previous
Reply
Map
View

Click here to load this message in the networking platform