ACC: Link Tables on a CD-ROM or Write-Protected Media (95/97)

Last reviewed: June 3, 1997
Article ID: Q151542
The information in this article applies to:
  • Microsoft Access 7.0, 97

SYMPTOMS

Novice: Requires knowledge of the user interface on single-user computers.

When you attempt to link to a table located on a read-only drive, a write- protected diskette, or a CD-ROM in Microsoft Access, you may receive the following error message:

   Couldn't lock file

CAUSE

The database file's Read-only attribute is set to False.

RESOLUTION

Set the Read-Only attribute of the database file (.mdb) before copying the file to the CD-ROM or diskette. Also, do not include the database's .ldb file. For example, if your database is named Myapp.mdb, do not include Myapp.ldb on the CD-ROM or diskette. Include only Myapp.mdb on the CD-ROM or diskette. Normally, the .ldb files are deleted when the last user closes the mdb.

Steps to Set the Read-only Attribute

In order to set the Read-Only attribute, the file must be located on a read/write drive.

  1. Start Windows Explorer and select your MDB file.

  2. On the File menu, click Properties.

  3. If the Read-only check box is not selected, click the check box to set the file to Read-only.

MORE INFORMATION

The symptoms described in this article occur only when linking to a Microsoft Access version 2.0 database.

In Microsoft Access 7.0 and 97, you can link to a table in a version 7.0 or 97 database that resides on a CD-ROM or write-protected diskette without having to set the Read-only attribute of the .mdb. However, it is recommended that you set the Read-only attribute of the .mdb file. If you do not set the Read-only attribute of the .mdb file, the linked table will appear to be updatable. That is, when viewing the linked table in Datasheet view, you see a blank record at the bottom of the table, indicating that the table is updatable. However, if you attempt to make changes to the data, you may receive the error, "Couldn't open file," and any changes you make are not saved.

Steps to Reproduce Behavior

  1. Copy a Microsoft Access version 2.0 database with at least one table to a floppy disk.

  2. Set the write-protection tab on the disk.

  3. Start Microsoft Access and create a new database.

  4. On the File menu, point to Get External data, and then click Link Data. In the Link dialog box, under Files Of Type, make sure that Microsoft Access is selected. Locate the file, and click OK. Note that you receive the error message mentioned in the SYMPTOMS section.

REFERENCES

For more information about linking tables, search the Help Index for "Linked Tables," or ask the Microsoft Access 97 Office Assistant.

For more information about read-only databases and .ldb files, please see the following article in the Microsoft Knowledge Base:

   ARTICLE-ID: Q136128
   TITLE     : ACC: Introduction to .LDB Files (95/97)


Additional query words: cdrom
Keywords : IsmIea kberrmsg kbinterop
Version : 7.0 97
Platform : WINDOWS
Hardware : X86
Issue type : kbprb
Resolution Type : Info_Provided


THE INFORMATION PROVIDED IN THE MICROSOFT KNOWLEDGE BASE IS PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND. MICROSOFT DISCLAIMS ALL WARRANTIES, EITHER EXPRESS OR IMPLIED, INCLUDING THE WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. IN NO EVENT SHALL MICROSOFT CORPORATION OR ITS SUPPLIERS BE LIABLE FOR ANY DAMAGES WHATSOEVER INCLUDING DIRECT, INDIRECT, INCIDENTAL, CONSEQUENTIAL, LOSS OF BUSINESS PROFITS OR SPECIAL DAMAGES, EVEN IF MICROSOFT CORPORATION OR ITS SUPPLIERS HAVE BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. SOME STATES DO NOT ALLOW THE EXCLUSION OR LIMITATION OF LIABILITY FOR CONSEQUENTIAL OR INCIDENTAL DAMAGES SO THE FOREGOING LIMITATION MAY NOT APPLY.

Last reviewed: June 3, 1997
© 1998 Microsoft Corporation. All rights reserved. Terms of Use.