Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Free table
Message
From
29/01/2011 16:36:55
Hilmar Zonneveld
Independent Consultant
Cochabamba, Bolivia
 
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Title:
Environment versions
Visual FoxPro:
VFP 9 SP2
OS:
Windows 7
Network:
Windows 2008 Server
Database:
Visual FoxPro
Application:
Desktop
Miscellaneous
Thread ID:
01497780
Message ID:
01497792
Views:
66
>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)
Previous
Reply
Map
View

Click here to load this message in the networking platform