Reading Access 2.0 db on network w/read-only access 
Author Message
 Reading Access 2.0 db on network w/read-only access

        First off, yes, I DO have the compatibility layer for 2.0 installed!

        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!

        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 are example statements I use for db access, BTW:

Set ggDataBaseID = OpenDatabase(App.Path & "\" & DATABASE_NAME, False,
True)

Set ssClasses = ggDataBaseID.CreateSnapshot(SQLStatement)
        (tried the above both with and without the DB_DENYWRITE option)

        I do not use anything but snapshots, either.

        Has anyone experienced this problem and solved it without granting read/write
access to that directory for everyone?

        Thank you for your bandwidth,
        Dar Steckelberg

***************************************************   ...    
*  Do not remove this sig under penalty of law!   *      :::
*  To be removed only by consumer.                *         :::   :''':
***************************************************            :::'''''
*  Dar Steckelberg * Computer Science Student     *         :::   :''':
*  South Dakota School of Mines & Technology      *      :::      '''''
*  Computer Science:  Some Assembly Required.     *   '''
***************************************************



Thu, 10 Jul 1997 05:17:15 GMT  
 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.



Sat, 12 Jul 1997 00:18:45 GMT  
 
 [ 2 post ] 

 Relevant Pages 

1. Can ADO read/write Access 2.0 DB?

2. Help: Problem reading Access 2.0 mdb from VB3 under Win95/Access 7.0

3. HELP - VB PRO /ACCESS 2.0 READ ACCESS ONLY mystery

4. Access Violation error on NT4 during DAO read of Access 2.0 table

5. Converting Access 2.0 DB to Access 97 DB in VB code

6. Access 2.0: reading directorie structure

7. Read and Write to Access 2.0 External Modules

8. How to Get VB 6 to Read Access 2.0

9. Access 2.0/VB 3.0/SQL 6.5 simultaneous read problem

10. Opening an Access 2.0 database with VB5 on Read-Only media

11. Read MS-Access 2.0 files with VB 3.0

12. Read Access 2.0 database?!

 

 
Powered by phpBB® Forum Software