Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Checking if table in use
Message
From
10/10/2004 04:00:00
 
 
To
10/10/2004 01:56:30
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
00950216
Message ID:
00950222
Views:
12
Hi Chaim -

That's because the USED() function does not actually check if a table.dbf is in use, but it only tells you if an alias name is used in the local, current datasession.
So you can Try to get exclusive access
TRY
   use mytable again Alias myAlias in 0 excl
CATCH
    Messagebox("Failed to ... ")
ENDTRY

IF USED('myalias')
    &&& continue processing
ENDIF
hth
-Stefan

>Hi all
>How can I check if my table in use?
>When i try this:
> use mytable again in 0 excl
> I get meg\ssage that file access is denied becase my table is in use.
>But when I run the following code:
if used (MYTABLE.DBF')
>messagebox('Used', 0+16)
>else
>messagebox('Not Used', 0+64)
>endif
I get my messagebox answer that my table not in used.
>Help please
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform