Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
A table is readonly anyway
Message
From
26/09/2012 08:02:14
 
 
To
25/09/2012 13:23:45
General information
Forum:
Visual FoxPro
Category:
Databases,Tables, Views, Indexing and SQL syntax
Environment versions
Visual FoxPro:
VFP 9 SP2
OS:
Windows XP SP2
Database:
Visual FoxPro
Miscellaneous
Thread ID:
01553537
Message ID:
01553657
Views:
50
Esp. your second paragraph I have forwarded to the network administrators. I think they have actually forgotten to give access on the sharing level.

What still intrigues me is how this API stores it. Afterall, all who share the file must be able to access that information.

>If I recall correctly, RLOCK() and FLOCK() do not actually modify the file -- so it doesn't matter if these files are effectively read-only. If I'm not mistaken those function use API calls to perform the lock -- so the locking is handled at the OS level. I vaguely recall that there was a byte-range locking scheme available with the DOS API (and I've got a vague recollection somehwere that negative values were somehow involved -- which implicitly results in a 2GB file size limitation).
>
>If I'm not mistaken, DOS-level file attributes and Windows security rights are completely separate -- so you can't really look at the DOS-level file attributes to determine if you've got write access or not. Files could have R/W attribute at the DOS level, but you might not have access rights to modify the file. Furthermore there is also the difference between access rights on the security level and those that are in the sharing level. The security rights may give you write access, but if the sharing not, then you don't have write access if the file is being accessed through a share (however if you're accessing it as a local file then it's OK). If you grant a user write access at the sharing level, but forget to give it in the security level, then the file is effectively read-only.
>
>>Read Only attribute on Folders has no meaning under Windows
>>
>>>I have now checked this and it is indeed the cause: The folder is ReadOnly.
>>>
>>>Interesting AND troublesome. I now realize that my RO/RW testing algorithms have a flaw: They do not test the folder's RO attribute. In my opinion it is a bug, or at least a quirck, of VFP. How on earth is it possible that rlock() returns true if isreadonly() is also true?!
>>>
>>>It makes me wonder where VFP stores the information that the user has locked a record.It can't be within the table, it can't be local, it can't be in a remote folder, it can't be in local memory. Who knows more about the how-and-where of storing lock-information?
Groet,
Peter de Valença

Constructive frustration is the breeding ground of genius.
If there’s no willingness to moderate for the sake of good debate, then I have no willingness to debate at all.
Let's develop superb standards that will end the holy wars.
"There are three types of people: Alphas and Betas", said the beta decisively.
If you find this message rude or offensive or stupid, please take a step away from the keyboard and try to think calmly about an eventual a possible alternative explanation of my message.
Previous
Reply
Map
View

Click here to load this message in the networking platform