On 17 Mar 98 at 13:29, Gary Perkins wrote:
> I'm getting an "error" message, that says a "Locking Violation" has
> occured.
> It doesn't appear to be connected to anything in particular. And it
> doesn't appear to create any problems.
> I can't locate any reference to Locking Violations in Help, so, can
> anyone tell me about Locking Violations?
33 ERROR_LOCK_VIOLATION
The process cannot access the file because another process has
locked a portion of the file.
Locking is a technique frequently used in database systems. [My
first search on "Locking Violation" turned up so many Oracle
references, I almost didn't notice the DOS/Windows OS-level error
code.]
A database file can be huge, and there may be more than one
person/application wanting to update it at a time. So instead of
opening the file in "exclusive" mode (nobody else can even look at
it), the database code opens it in a shared mode, and uses locking to
temporarily deny access to records that are being updated at this
moment.
I believe what triggers this error is that some second application
has tried to open the database file in a mode that doesn't respect
this kind of locking.
[If the second app asked for simple exclusive access, that would
simply be denied if any other process had the file open in any mode,
so it's a more subtle problem than that. My guess would be that the
option to lock part of a file was added to later versions of DOS, and
is only supported by newer DOS APIs. IFF you're running an app that
depends upon locking, and another app tries to open the file using an
API that indicates that it doesn't know about locking, THEN you have
a conflict and the OS signals this error.]
It's hard to be any more precise without some idea what
applications you're running.
David G
|