Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Check to see if a table exists without knowing its locat
Message
 
To
04/05/2005 15:41:45
General information
Forum:
Visual FoxPro
Category:
Databases,Tables, Views, Indexing and SQL syntax
Environment versions
Visual FoxPro:
VFP 8 SP1
OS:
Windows XP SP2
Network:
Windows 2000 Server
Database:
Visual FoxPro
Miscellaneous
Thread ID:
01010987
Message ID:
01011032
Views:
17
You do not need to set the path. This also should work:
open database c:\.....\.....\databasename

In any case the information about the table path should be stored in the database. Sometimes the table name is stored without it, which (probably) means that the table supposed to be in the DBC file directory.

You also could do something like this:

use dbc_file.dbc
browse && to see all the properties for the object you wish


>Great! Thank you. Of course for this to work we would have to set the path to the location where the database is located.
>
>>Something like this:
>>
>>open database ...
>>?FILE(DBGETPROP(table_name,"TABLE","PATH"))
>>
>>>If I have a database: dbWorkFiles
>>>
>>>and I want to determine if one of its tables physically exist I would typically store a common path to the data directory to a variable like 'ddir' and then do:
>>>
>>>IF FILE (ddir+'mytable.dbf')
>>>
>>>However, if I do not know exactly where the tables are located - lets say I open them with:
>>>
>>>use dbWorkFiles!mytable
>>>
>>>then how can I check to see if the table exists or not if I do not know where they are located? Is that possible? It could be a part of the database but not physically exist...
Previous
Reply
Map
View

Click here to load this message in the networking platform