db or object read-only

Results 1 to 2 of 2

Thread: db or object read-only

  1. #1
    Join Date
    Dec 1969

    Default db or object read-only

    I&#039;m trying to sort out this error message displayed in browser:<BR><BR>Microsoft OLE DB Provider for ODBC Drivers (0x80004005)<BR>[Microsoft][ODBC Microsoft Access Driver] Cannot update. Database or object is read-only.<BR><BR>The code which results in this error is:<BR><BR>fldDestinationName = request("fldDestinationName")<BR><BR> Set objectConnection = Server.CreateObject( "ADODB.Connection" )<BR> objectConnection.ConnectionString = "DSN=dsncruisenetwork"<BR> objectConnection.Open <BR><BR> Set recSet = Server.CreateObject("ADODB.Recordset")<BR> recSet.CursorLocation = adUseServer<BR> recSet.CursorType = adOpenKeyset<BR> recSet.LockType = adLockOptimistic<BR> recSet.Open "tblDestinations", objectConnection,,,adCmdTable<BR> <BR> recSet.AddNew<BR> recSet("fldDestinationName") = fldDestinationName<BR> <BR> recSet.Update<BR> fldDestinationID = recSet("fldDestinationID")<BR> recSet.Close <BR><BR><BR> set recSet = nothing<BR> objectConnection.Close<BR> set objectConnection = nothing<BR> Response.Write(strPage)<BR> <BR>I&#039;ve checked the db, it is NOT read only. The sql string works fine (thus table, fields and dsn (system dsn) are all ok).<BR><BR>What might be causing this? Oh yes. Trying to insert a row into access from a locally hosted webpage. <BR><BR>Any hints will be gratefully received.<BR><BR>Cheers<BR>Toby

  2. #2
    Join Date
    Dec 1969

    Default RE: db or object read-only

    Have you checked that the user that IIS is executing under (NOT your user account, normally the user account that starts "IUSR_") has READ/WRITE/MODIFY access to the DIRECTORY that the database sits in?<BR><BR>As per the FAQ:<BR>http://www.aspfaqs.com/aspfaqs/ShowFAQ.asp?FAQID=107<BR><BR>Craig.

Posting Permissions

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