Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Closing work area
Message
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
00547977
Message ID:
00547996
Views:
7
>hey everyone,
>here's my situation. i have a program that runs on a scheduler. the program runs fine, but i cannot access one of the databases the program inserts into if the program is still on the scheduler. i can acces the database if the program is not still on the scheduler. that is if the scheduler is not running. i am pretty sure the problem is that the database still thinks that it is being held in the work area. my problem is that i open 2 databases in the work area at once. the following code resembles the problem:
>
> Use (example1.dbf) in 0 shared alias a_alias
> Use (example2.dbf) in 0 shared alias a_alias2
>
> select a_alias
> scan
>
> If a_alias->field > 0 .and. not empty(a_alias->field)
>
> Insert into a_alias2 ;
> ( a , ;
> b , ;
> c )
> Values (a_alias->x , ;
> a_alias->y, ;
> a_alias->z)
>
> endif
> endscan
>
>does anyone have any suggestions on how to close both work areas when i am done.
>i have a "use" command at the very end of the program but it doesn't seem to be closing this out. this statement is embedded in a nested if. any suggestions would be appreciated. thanks

Use CLOSE TABLES if you simply want to close all free tables or any open in the current database. Use CLOSE TABLES ALL to close all free tables and all tables open associated with any currently open database.

CLOSE ALL not only closes the tables, but any open databases regardless of whether or not it's the active sessions, plus closes any files opened FCREATE() or FOPEN().
George

Ubi caritas et amor, deus ibi est
Previous
Reply
Map
View

Click here to load this message in the networking platform