Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
How to check for open table in vfp5.0
Message
General information
Forum:
Visual FoxPro
Category:
Other
Miscellaneous
Thread ID:
00115596
Message ID:
00115638
Views:
13
Hi Virusim,

It seems to me that you want to find out whether Table1 is opened somewhere
on the Net or not. So you can exclusively open it.
There is no direct way to do it. but you can make your own function

FUNCTION isopen(tctable)
LOCAL lcerror
PRIVATE liserror
lcerror = ON('Error')
ON ERROR DO myerrtrap
USE tctable EXCL
ON ERROR &lcerror
RELEASE liserror
RETURN NOT liserror
ENDFUNC

FUNCTION myerrtrap()
IF ERROR() = error number of file access denied (Sorry find it out)
liserror = .T.
ENDIF
ENDFUNC


Hope will help

Bye
Jayesh


> I am converting clipper 5.2 code to visual foxpro 5.0 code. There is
>a code in clipper 5.2 that test for whether table open is successful, it is also can check for whether the table is open in share mode, the command is NETERR().
>
> Which function in vfp 5.0 is best to replace this clipper 5.2 function.
>I had tried to use vfp USED() and ISEXCLUSIVE() and ERROR() function to check whether my table is open successfully, and whether other program had open the same table,yet the function use is not working as I expected like clipper function do.
>
>Any help is very much appreciated. Thank you.
- Jayesh
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform