Does Jackcess support locking MDB files?
It would be very useful to make shared or exclusive locks on file, e.g.
methods like this: lock(boolean shared) and unlock() methods
many thanks for all your work
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
jackess does not do any file locking currently. why do you want to lock the
file? are you worried about other users of jackcess, or someone using
microsoft access on the same mdb file? the reason ask is because i don't
believe ms access locks the mdb file directly, but instead locks a separate
file.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
For MsMoney file (*.mny), Money created a lock file name fileName.lrd with 1K
size. The file appears to have additional information such as hostname,
process name ...
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Yes, the same MDB file may be accessed by other Java processes, MS Access,
etc. Thus the file may be corrupted if several users try to read/write it.
How about OS file locks implemented in Java (java.nio.channels.FileLock)? For
example Jackcess may use a shared lock when reading MDB data and use an
exclusive lock while writing data... Probably it should be an option
configured by some method like setLockingEnabled(boolean lockEnabled)...
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
yes, but locks are only useful if all applications use them. like i said, ms
access doesn't lock the access db, it uses a separate lock file (access
creates a file named fileName.ldb with some info like computer and user). so
locking the mdb file will not help you if you are trying to protect from
simultaneous edits from ms access.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Does Jackcess support locking MDB files?
It would be very useful to make shared or exclusive locks on file, e.g.
methods like this: lock(boolean shared) and unlock() methods
many thanks for all your work
jackess does not do any file locking currently. why do you want to lock the
file? are you worried about other users of jackcess, or someone using
microsoft access on the same mdb file? the reason ask is because i don't
believe ms access locks the mdb file directly, but instead locks a separate
file.
For MsMoney file (*.mny), Money created a lock file name fileName.lrd with 1K
size. The file appears to have additional information such as hostname,
process name ...
Yes, the same MDB file may be accessed by other Java processes, MS Access,
etc. Thus the file may be corrupted if several users try to read/write it.
How about OS file locks implemented in Java (java.nio.channels.FileLock)? For
example Jackcess may use a shared lock when reading MDB data and use an
exclusive lock while writing data... Probably it should be an option
configured by some method like setLockingEnabled(boolean lockEnabled)...
yes, but locks are only useful if all applications use them. like i said, ms
access doesn't lock the access db, it uses a separate lock file (access
creates a file named fileName.ldb with some info like computer and user). so
locking the mdb file will not help you if you are trying to protect from
simultaneous edits from ms access.