Weird permissions bug

Results 1 to 2 of 2

Thread: Weird permissions bug

  1. #1
    Join Date
    Dec 1969

    Default Weird permissions bug

    I am getting a weird 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>/links/add.asp, line 62 <BR><BR>---<BR><BR>the code<BR><BR>---<BR>&#060;%<BR>if request.form("stage")="2" then<BR>Set MyConn = Server.CreateObject("ADODB.Connection")<BR>set ors = Server.CreateObject("ADODB.Recordset")<BR>MdbFileP ath = "d:sjroot26wwwrootlinkssquadlinks.mdb"<BR>MyConn.O pen "Driver={Microsoft Access Driver (*.mdb)}; DBQ=" & MdbFilePath & ";" <BR>ors.Open "tblSquads", MyConn, adOpenKeyset, adLockOptimistic<BR>ors.AddNew<BR>ors.Fields("AF3" ) = request.form("AF3")<BR>&#039insert another 20 fields..<BR>ors.Fields("DF") = request.form("DF")<BR>ors.Update<BR>ors.Close<BR>S et ors = Nothing<BR>MyConn.Close<BR>Set MyConn = Nothing<BR>response.write "Link Added.<BR><BR>"<BR>End If<BR>validated="true" <BR>%&#062;<BR><BR><BR>This seems syntactically correct to me.. any ideas?

  2. #2
    Join Date
    Dec 1969

    Default RE: Weird permissions bug

    It looks ok to me. if you are using a nt server you need to make sure that the ISUSR_ServerName has the read/write permission to the database file. Make sure the file its self is not readonly (you probably checked that). on your code you could add <BR>",adCmdTable" at the end of your recordset open statement or change your cursor type to adOpenStatic(it should not make a difference but give them a try). One more thing, if you are hosting this database on someone elses server you will need to make sure the database and folder has access permission for the general public.<BR>Hope this helps.

Posting Permissions

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