Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Is the Table Open?
Message
From
13/04/2000 11:17:40
 
 
To
13/04/2000 10:09:05
General information
Forum:
Visual FoxPro
Category:
Databases,Tables, Views, Indexing and SQL syntax
Miscellaneous
Thread ID:
00359251
Message ID:
00359298
Views:
7
USED() doesn't tell you whether a table is in use, it tells you whether an alias is in use or, if you pass a numeric value, whether a work area is in use. DBF() tells you the name of the table that is in use in the current work area. If it's a view, then it will be a temporary table and JUSTEXT( DBF()) will return TMP.

To do what you want, you could adopt an alias naming scheme that includes some reference to the database, for example
USE source!seq_no in 0 alias SrcSeqno
Then, USED("SrcSeqno") will tell you if source!seq_no is in use.

>I have two different databases (named source and target)
>
>How do I detirmine if the seq_no table is open in source already?
>
>I usually use:
>
>if select("seq_no") > 0 then
>    select seq_no
>else
>    select 0
>    use seq_no
>endif
>
>Now I need a solution that will look at which database the table is open in.
>
>TIA!
>
>ps, I am sure that Erik will be talking about this in a hour or two, but just in case someone wants to beat him to it }:-)
Rick Borup, MCSD

recursion (rE-kur'-shun) n.
  see recursion.
Previous
Reply
Map
View

Click here to load this message in the networking platform