ASP Common Errors and Solutions

Error: Item cannot be found in the collection corresponding to the requested name or ordinal.

Solution: Form fields do not match table structure. It is trying to post a field name that is not in the database table. Double-check field names that are being posted to the ASP page against the table structure. Check spelling of field names in form against spelling in your database table. Check submit button on form to make sure you are not giving the submit button a name, then attempting to loop through all fields in the collection to add to table (there would not be a field in the database table to match your submit button name). Try posting to a dummy page that has only THIS code so you can print and double-check field names and values that are trying to post.

 

Error: Database or object is read-only.

Solution: Your visitors need write permissions on your database file. Email me (home email address) your account name (A01, A02, etc.) and your database file name (data.mdb, mydata.mdb, etc.) requesting me to change permissions on the file.

 

Error: Microsoft OLE DB Provider for ODBC Drivers (0x80040E14) [Microsoft][ODBC Microsoft Access Driver] Invalid SQL statement; expected 'DELETE', 'INSERT', 'PROCEDURE', 'SELECT', or 'UPDATE'.

Solution: Check your table name in your ASP page to make sure it matches your database table name exactly.

 

Error: 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 0x2b4 Thread 0x6e8 DBC 0x9ab3014 Jet'.

Solution: Check your connection string and make sure it references the correct path and file name of your database file.

 

Error: Error Type: Microsoft JET Database Engine (0x80004005) Operation must use an updateable query.

Solution: Your visitors need write permissions on your database file. Email me (home email address) your account name (A01, A02, etc.) and your database file name (data.mdb, mydata.mdb, etc.) requesting me to change permissions on the file.

 

Error: Error Type: Microsoft JET Database Engine (0x80040E10) No value given for one or more required parameters.

Solution: Your SQL statement either (1) references a field which is not in the table specified (probably a mistyped field name), or (2) references a value which is empty (probably a variable is empty that was used to build a value in the WHERE clause of the SQL statement.

 

Error: Error Type: ADODB.Field (0x80020009) Either BOF or EOF is True, or the current record has been deleted. Requested operation requires a current record.

Solution: There is not a current record. Probably forgot to insert the following lines after you issued your SQL command with rs.open sql, conn
do until rs.EOF
  you referenced a field in the recordset here - rs.Fields("FieldName") - ,
         without the other lines above/below
  rs.MoveNext
loop