Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
How to tell if file is open exclusively ?
Message
From
15/05/2001 09:43:41
 
 
To
05/05/2001 17:04:42
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
00503929
Message ID:
00507243
Views:
21
Hello Alejandro

This function works with any file not just a dbf.
	* Function returns true if file or table can be locked for writing
	Func LOCKABLE
	Lparam lcFile
	Local lcRetval,liHandle
	lcRetval=.f.
	liHandle=fopen(lcFile,12)
	If liHandle>0
		lcRetval=.t.
		=fclose(liHandle)
	Endif
	Return lcRetval
>I'm writing a routine to open a file exclusively. If I find the file is already open, how can I tell whether it is opened exclusively other than by closing it and trying to opening it exclusively, trapping for error?
>
>TIA,
>
>Alex
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform