Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Lock and unlock a file
Message
 
 
To
14/07/2016 02:06:12
Dragan Nedeljkovich (Online)
Now officially retired
Zrenjanin, Serbia
General information
Forum:
Visual FoxPro
Category:
Other
Miscellaneous
Thread ID:
01638353
Message ID:
01638379
Views:
49
>>>So, this is the answer on the second part of your question. Most likely if your application will not be shutdown properly, the file will remain locked. I do remember long time ago we did unlock files using some special tool.
>>
>>Therefore I cannot use this semaphore locking approach. Because sooner or later it will fail and there will be a problem. So I will work on another approach.
>
>Actually I think the semaphore file approach is slower for what you're trying to achieve. The whole idea of client-server is to do as much on the server as possible, and pass only commands and results across the wire. Directory access is among slower things in that respect (just remember the issues with path in the fxp we had this week). On top of that, there are issues with special folders, UAC, virtualization etc, so the behavior of a folder may not be what you expect, and it may change because some IT cerberus may wake up thinking he hasn't done enough and tries to introduce yet another security measure without telling anyone.
>
>Also, some of the versions of network protocol under Windowses may decide that you shouldn't keep a file open for too long, and may just decide to close it for you. I've seen it several times since Windows 98, it's a feature that gets turned on or off under mysterious circumstances, never caught any logic to it.

All your points are valid. I agree that I need to find another approach. I will start a thread on that in the SQL Server forum.
Thank you!
"The creative process is nothing but a series of crises." Isaac Bashevis Singer
"My experience is that as soon as people are old enough to know better, they don't know anything at all." Oscar Wilde
"If a nation values anything more than freedom, it will lose its freedom; and the irony of it is that if it is comfort or money that it values more, it will lose that too." W.Somerset Maugham
Previous
Reply
Map
View

Click here to load this message in the networking platform