Cannot update. Database or object is read-only.

Results 1 to 2 of 2

Thread: Cannot update. Database or object is read-only.

  1. #1
    Join Date
    Dec 1969
    Posts
    58

    Default Cannot update. Database or object is read-only.

    Created a simple Access DB that has 1 table with 5 columns...<BR>I want to add to the DB using ASP but, I get the following error.<BR><BR>Microsoft OLE DB Provider for ODBC Drivers error &#039 80004005&#039 <BR><BR>[Microsoft][ODBC Microsoft Access Driver] Cannot update. Database or object is read-only. <BR><BR><BR>Here is the code.<BR><BR>&#060;!-- #INCLUDE FILE="adovbs.inc"--&#062;<BR>&#060;%<BR>CST= "DBQ=d:htmluserschuckhoggcomhtmlxavier.mdb;Driver= {Microsoft Access Driver (*.mdb)};DriverId=25;user=Admin;password=test"<BR> Set objRecordset = Server.CreateObject("ADODB.Recordset")<BR>objRecor dset.Open "Students", CST, adOpenDynamic, adLockPessimistic, adCmdTable<BR>objRecordset.AddNew<BR>objRecordset. Fields("FirstName") = "Chris"<BR>objRecordset.Update<BR>objRecordset.Clo se%&#062;<BR><BR>How do I make it not read only! :(

  2. #2
    Join Date
    Dec 1969
    Posts
    463

    Default RE: Cannot update. Database or object is read-only

    You need to check the permissions on the file you are trying to update, this is done through your servers OS. If the database is set to read only it will return this error when you try to change it.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •