Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
.dbf is open by someone
Message
 
 
To
24/09/2002 22:37:21
General information
Forum:
Visual FoxPro
Category:
Forms & Form designer
Miscellaneous
Thread ID:
00704072
Message ID:
00704078
Views:
21
>in multiuser environment how do i detect, that the file is open by someone

You could do something like this.
ON ERROR CatchExclusiveError() && special error handler to catch if table could be used exclusively
USE mytable EXCLUSIVE 
ON ERROR MyNormalErrorHandler() && enable normal error handler

PROCEDURE CatchExclusiveError()
	IF ERROR() = 1705
                * table couldn't be opened exclusively. Someone has it open
		* do processing or actions if table could not be opened exclusively
	ELSE
		* do processing or actions if table could be opened exclusively
	ENDIF
	RETURN
ENDPROC
Previous
Reply
Map
View

Click here to load this message in the networking platform