Active Server Pages (ASP) Access Database Errors

Some of the most common questions asked on the Web Wiz Guide Forums are from people getting errors when using Microsoft Access with ASP. So in this article I'm going to try and explain what a few of the more common errors mean and how to solve them.

Common Access Database Errors

  1. Cannot update. Database or object is read-only
  2. Operation must use an updateable query
  3. General error Unable to open registry key
  4. Could not find file
  5. Could not use '(unknown)'; file already in use
  6. Table 'tblTable' is exclusively locked by user 'Admin' on machine 'MyMachine'
  7. Too few parameters. Expected 1
  8. Either BOF or EOF is True, or the current record has been deleted
  9. Item cannot be found in the collection corresponding to the requested name or ordinal
  10. The search key was not found in any record


Cannot update. Database or object is read-only.
Microsoft OLE DB Provider for ODBC Drivers error '80004005'
[Microsoft][ODBC Microsoft Access Driver] Cannot update. Database or object is read-only.

This is the most common error that I'm asked about. This error usually happens when you try to insert data into or update data in an Access database. It means that you don't have sufficient permissions to write to the database.

If you are running the web server yourself then read the FAQ, Checking and Setting up the Correct Permissions on the Server.

If you are not running the server yourself you will need to contact your web space provider and ask them how to sort the problem out. You may need to use a special folder or they may have to setup a system DSN for you or change the permissions on the directory containing the database.


Operation must use an updateable query
Microsoft OLE DB Provider for ODBC Drivers error '80004005'
[Microsoft][ODBC Microsoft Access Driver] Operation must use an updateable query.

This error usually happens when you try to insert data into or update data in an Access database. It means that you don't have sufficient permissions to write to the database.

If you are running the web server yourself then read the FAQ, Checking and Setting up the Correct Permissions on the Server.

If you are not running the server yourself you will need to contact your web space provider and ask them how to sort the problem out. You may need to use a special folder or they may have to setup a system DSN for you or change the permissions on the directory containing the database.


General error Unable to open registry key
Microsoft OLE DB Provider for ODBC Drivers (0x80004005)
[Microsoft][ODBC Microsoft Access Driver]General error Unable to open registry key 'Temporary (volatile) Jet DSN for process 0x6cc Thread 0x78c DBC 0x144cfc4 Jet'.

This error can happen for a number of reasons the main reason being if the path to the database is incorrect.

You need to check that the path to the database is correct (You must use the physical path on the server to the database and not a virtual path).

The error is also quite common if the permissions on the server are incorrect. Check that IIS has sufficient permissions to access the registry and that the correct permissions, read and write, are set on the directory containing the database and the database itself, for the IUSR account.


Could not find file
Microsoft JET Database Engine (0x80004005)
Could not find file 'C:\Inetpub\wwwroot\databaseName.mdb'.

This error is more or less what it says, the database file can not be found. This usually occurs if the path to the database is incorrect.

You need to check that the path to the database is correct (You must use the physical path on the server to the database and not a virtual path).


Could not use '(unknown)'; file already in use
Microsoft OLE DB Provider for ODBC Drivers error '80004005'
[Microsoft][ODBC Microsoft Access Driver] Could not use '(unknown)'; file already in use.

This is a bit of an odd error that I have never received myself but have been asked about on number of occasions. It usually means that either incorrect permissions are set on the server or the incorrect version of MDAC (Microsoft Data Access Components installed on the server or the version is not correctly installed). You need to ensure the ODBC version you have is 4 or greater.

If you are running the web server yourself then read the FAQ, Checking and Setting up the Correct Permissions on the Server and the FAQ on, Checking you have the correct ODBC Access Database Drivers.

If you are not running the server yourself you will need to contact your web space provider and ask them how to sort the problem out.

Another reason for this error is that you have the database already open in MS Access or another program, if this is the case shut down the other program you have the Access database open in.


Table 'tblTable' is exclusively locked by user 'Admin' on machine 'MyMachine'
Microsoft JET Database Engine error '80004005'
Table 'tblTable' is exclusively locked by user 'Admin' on machine 'MyMachine'.

This error means that you are either unable to open the table or that you already have the table open in 'Design View' in Microsoft Access. Close Access and try again.


Too few parameters. Expected 1
Microsoft OLE DB Provider for ODBC Drivers (0x80040E10)
[Microsoft][ODBC Microsoft Access Driver] Too few parameters. Expected 1.

This error occurs only with Microsoft Access when one of the field names used in a select statement does not exist in the table being queried.

Check that your SQL query is correct and that you have not misspelled any of the field names in your select statement and that the field name exists in the table being queried.


Either BOF or EOF is True, or the current record has been deleted
ADODB.Recordset (0x800A0BCD)
Either BOF or EOF is True, or the current record has been deleted.
Requested operation requires a current record.

This is a recordset error. It means that you have tried to read into a variable or display in a web page a record from the recordset that has either been deleted or does not exist.

The most common occurrence of this error is if you have run a database query that has not returned any records and you have then tried to read in a record from the recordset that contains no data.

You need to first check that there is a record in the recordset before reading it in (eg. 'If NOT rsRecordSet.EOF Then').


Item cannot be found in the collection corresponding to the requested name or ordinal
ADODB.Recordset (0x800A0CC1)
Item cannot be found in the collection corresponding to the requested name or ordinal.

This like the error above is a recordset error. You have tried requesting a field from the recordset that does not exist.

Check when you are reading in the field from the recordset into a variable or to display in a web page that you have spelt the field name correctly and that the field exists in the database.


The search key was not found in any record.
Microsoft JET Database Engine (0x80004005)

The search key was not found in any record.
This error often means that the database has become corrupted.

The solution to this is to repair the database. If the database is on a remote server download the database and follow the instructions below to repair the database.

Access 2000, XP, and 2003 Compact and Repair Database
Open the database in Microsoft Access, click on the 'Tools' menu and select 'Database Utilities -> Compact and Repair Database'.

Access 2007 Compact and Repair Database
Open the database in Microsoft Access, click on the 'Office Button' in the top left corner then select 'Manage -> Compact and Repair Database'.

Click for more (Err:80040E14 Syntax errors)

#1054 - Unknown column '' in 'field list'

#1054 - Unknown column '' in 'field list'

Solution:Hi there, I had the same issue and it was doing my head in!

I found the cause though; it is to do with using grave accents instead of straight quote
mark/apostrophes in the query.

e.g. `NULL` instead of 'NULL'

I had the problem when I copied and pasted a list of fields from an SQL manager.

I hope this works