>How I can know if a table is in a database and release?
To free it: REMOVE TABLE. If the database can't be found, use FREE TABLE instead. Please read the warnings in help, under FREE TABLE.
Right now I can't find a specific function to see whether a table is part of a database. But if you close all databases, then open a table, if it belongs to a database the database will also be opened.
close database all
use MyTable
? dbused("MyDatabase")
The above assumes that all tables either belong to a specific database, or not. If you want to see whether the table belongs to ANY database, use adatabases() instead.
I was hoping to find a function to quickly return the name of the containing database, if any, but right now I can't find it.
HTH,
Hilmar.
-----
Update: I found the function INDBC(), but once again the question is whether the table is in a specific database.
Difference in opinions hath cost many millions of lives: for instance, whether flesh be bread, or bread be flesh; whether whistling be a vice or a virtue; whether it be better to kiss a post, or throw it into the fire... (from Gulliver's Travels)