ACC1x: Using SHARE.EXE and VSHARE.386 with Microsoft AccessID: Q95047
|
MS-DOS, Microsoft Windows, and Windows-based applications use
SHARE.EXE to provide a file locking mechanism so that Windows-based
tasks can communicate with each other. The tasks use SHARE.EXE to sort
out file read/write conflicts. Therefore, it is important that you
load SHARE.EXE before starting Windows. Without SHARE.EXE loaded, you
may experience data corruption in applications.
Using SHARE.EXE with Microsoft Access allows multiple users to access a
database at the same time while protecting them from updating the same
record at the same time. If a database is opened exclusively by one
user, no other users will be able to use the database until the first
user releases it. However, if all users open the database in a shared
mode, SHARE.EXE allows all users to read and write to the database
simultaneously, with the exception of locked records. For example, if
a user has record 100 open on a particular database, that record is
considered locked, and no other users will be able to change any data
in record 100 until the first user finishes changing it.
For this reason, while it is possible to run Microsoft Access without
first loading SHARE.EXE, Microsoft does not recommend it. If you choose
not to use SHARE.EXE, you must ensure that only one Windows-based task
writes to a database record at any given moment.
MS-DOS uses SHARE.EXE to lock files as requested by applications.
SHARE.EXE controls updates and prevents data corruption in files.
An application can request a deny-read lock (exclusive), a deny-write
lock, or both. Deny-write locks allow other applications to read data,
but prevent two different applications from updating the same file at
the same time.
SHARE.EXE also provides byte-range locks. When a range of bytes is
locked, other applications cannot read, write, or lock those bytes.
Other, unlocked bytes, in the file are not affected. An application
can use byte-range locks to place exclusive locks on records for
record-level locking.
In single-user environments, SHARE.EXE prevents file contention
accidents when multiple instances of a program attempt to write to the
same database or database record at the same time. In multiple-user
environments such as networks, SHARE.EXE prevents possible database
corruption when several different network users attempt to write to
the same database or database record at the same time.
<MS-DOS directory>\SHARE.EXE /L:500
Additional query words: WinIss
Keywords : kbenv
Version : 1.0 1.1
Platform : WINDOWS
Issue type : kbinfo
Last Reviewed: March 18, 1999