
Reading Access 2.0 db on network w/read-only access
Quote:
>Subject: Reading Access 2.0 db on network w/read-only access
>Date: Sat, 21 Jan 1995 21:17:15 GMT
> My program is designed to let students plan their next semester's
schedule by >reading in the classes available from an Access 2.0 database.
However, the >students can naturally have read-only access to that directory
(we use >Novell on our network). However, every time we try to run it, we get
the >error "Couldn't lock file; SHARE.EXE must be loaded." -- but SHARE *is*
loaded!
Quote:
> When we use an account with read/write access to that directory, naturally it
>works! But I've done all I can think of and find to set all db calls to
>read-only access, to no avail.
Here's the answer to your problem, it happened to me not that long ago. The
article is from the MS Knowledgebase somewhere on the MS server:
PRB: Error: Couldn't Lock File SHARE.EXE Hasn't Been Loaded
Article ID: Q110732
---------------------------------------------------------------------
The information in this article applies to:
- Standard and Professional Editions of Microsoft Visual Basic for
Windows, versions 3.0
----------------------------------------------------------------------
SYMPTOMS
========
Trying to use a Microsoft Access Database that is located on a Read-Only
Share or Network Drive might generate the following error:
Couldn't lock file SHARE.EXE hasn't been loaded.
CAUSE
=====
When Visual Basic tries to connect to a Microsoft Access database, an .LDB
file is created or the existing .LDB is used in the Database directory.
The .LDB file is used to assist in the management of the file locking
mechnisim with multiple users. This file must be in the same directory as
the database and the file or directory must have Read/Write access or the
above error is generated.
This happens because the Microsoft Access engine in Visual Basic cannot
create or write to the necessary .LDB file.
RESOLUTION
==========
In order to prevent the use or creation of the .LDB file, open the database
Exclusive use and Readonly (because of the readonly of the server) access.
This tells the Microsoft Access Engine that the database will be opened for
single user only and that the .LDB file will not be necessary. If the
database is multiuser, users will have to have Read/Write access to the
.LDB file.
STATUS
======
This behaviour is by design.
MORE INFORMATION
==================
Steps to Reproduce Behavior
---------------------------
1. Start a new project in Visual Basic. Form1 is created by default.
2. Add a Data Control to Form1, and set its Read-Only property to True.
3. In the DatabaseName property of the Data Control, enter the name of a
Microsoft Access Database that is located on a Read-Only network share.
4. Run the application, and you will recieve Error 3050:
Couldn't lock file SHARE.EXE hasn't been loaded.
Additional reference words: 3.00
KBCategory: kbprg
KBSubCategory: APrgDataOther
Copyright 1993 Microsoft Corporation. All rights reserved.