ACC2000: Link Tables on a CD-ROM or Write-Protected Media (208431)



The information in this article applies to:

  • Microsoft Access 2000

This article was previously published under Q208431
Novice: Requires knowledge of the user interface on single-user computers.

This article applies only to a Microsoft Access database (.mdb).

SYMPTOMS

When you try to modify a linked table that is located on a read-only drive, a write-protected disk, or a CD-ROM in Microsoft Access, you may receive the following error message:
The Microsoft Jet database engine cannot open the file 'A:\Myapp.mdb'.
It is already opened exclusively by another user, or you need permission to view its data.

CAUSE

The database file's read-only attribute is set to False and as a result, the linked table appears to be updateable.

RESOLUTION

Set the read-only attribute of the database file (.mdb) before copying the file to the CD-ROM or floppy disk. 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 floppy disk. Include only Myapp.mdb on the CD-ROM or floppy disk. Normally, the .ldb files are deleted when the last user closes the mdb.

Steps to Set the Read-Only Attribute

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 to select the check box to set the file access to Read-Only.

MORE INFORMATION

In Microsoft Access 2000, you can link a table in a database that resides on a CD-ROM or write-protected floppy disk without having to set the read-only attribute of the .mdb file. However, it is recommended that you do set the read-only attribute of the .mdb file. If you do not do so, the linked table appears to be updateable. 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 updateable. However, if you try to make changes to the data, you may receive the following error message
The Microsoft Jet database engine cannot open the file 'A:\Myapp.mdb'.
It is already opened exclusively by another user, or you need permission to view its data.
and any changes that you make are not saved.

Steps to Reproduce Behavior

  1. Copy a Microsoft Access 2000 database with at least one table to a floppy disk.
  2. Set the write-protection tab on the disk to prevent changes to the file.
  3. Start Microsoft Access and create a new database.
  4. On the File menu, point to Get External data, and then click Link Tables. In the Link dialog box, under Files of type, make sure that Microsoft Access is selected. Locate the file, and then click Link.
  5. In the Link Tables box, select a table to create a link, and then click OK.
  6. Open the linked table in the new database in Datasheet view and notice that the last line is blank. Enter at least one new record by typing data directly on the last line.
  7. Close the table and then open it again in Datasheet view.

    Notice that your new records were not saved because the disk is write-protected.

REFERENCES

For more information about linking tables, click Microsoft Access Help on the Help menu, type link data in the Office Assistant or the Answer Wizard, and then click Search to view the topics returned.

For additional information about read-only databases and .ldb files, click the article number below to view the article in the Microsoft Knowledge Base:

208778 ACC2000: Introduction to .ldb Files


Modification Type:MajorLast Reviewed:6/24/2004
Keywords:kberrmsg kbinterop kbprb KB208431