Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Close databases command Not always working
Message
From
18/12/2002 18:24:26
Dragan Nedeljkovich (Online)
Now officially retired
Zrenjanin, Serbia
 
 
To
18/12/2002 10:20:51
General information
Forum:
Visual FoxPro
Category:
Databases,Tables, Views, Indexing and SQL syntax
Miscellaneous
Thread ID:
00734094
Message ID:
00734325
Views:
18
>I need some clarification.
>
>I have a project that was converted to VFP6. At the end of each program there is a close databases command. This command was issued to close any open tables. However sometimes the tables get closed and at other times some tables get left open. This causes an error when another program tries to access the Table. The tables are being opened with the use tablename command.
>
>If I take the table out of the DBC and issue the use table name then Close databases, the table will close. If the table is in a DBC "close databases"
>does not always close the table.
>
>Has anyone else run into this problem before? Does anyone know what is causing this to happen? I know that a "close databases all" command will
>close the table. But I really do not want to go through and modify every program.

Just to add - Close Databases closes the data belonging to the current dbc. Close Databases All does close all the tables, but it also operates on the current data session only. So if you have multiple data sessions, it closes the tables in the current one only, and doesn't touch the others.
What you can do is to issue na aused() at the beginning, and another one at the end (of the code you want to bracket) and then close any alias mentioned in the second one but not in the first array.

Another thing which may prevent closing tables is any unresolved stuff in the buffers. Any tableupdate() which fails, leaves the buffers unsaved. You have to tablerevert() them, or resolve the issue until tableupdate() succeeds, or else you can't close the tables.

back to same old

the first online autobiography, unfinished by design
What, me reckless? I'm full of recks!
Balkans, eh? Count them.
Previous
Reply
Map
View

Click here to load this message in the networking platform