23 September 2011 21:36
I am getting the following error when trying to update a table in an access db using vb script:
Microsoft OLE DB Provider for ODBC Drivers error '80004005'
[Microsoft][ODBC Microsoft Access Driver] Operation must use an updateable query.
The code is:
Set Connection = Server.CreateObject("ADODB.Connection")
SQLStmt = "UPDATE DISTINCTROW [tblTotalHrs] "
SQLStmt = SQLStmt & "SET emplappr='" & emplappr & "',reghrs='" & wreghrs & "',pto='" & wpto & "',std='" & wstd & "',brvhrs='" & wbrv & "',totworked='" & wtotwork & "',ovthrs='" & wovthrs & "',weekhrs1='" & wwk1 & "',weekhrs2='" & wwk2 & "',sprvappr='" & suppappr & "',brvcomm='" & brvcomm & "',borhrs='" & borhrs & "' "
SQLStmt = SQLStmt & "WHERE empid='" & empid & "' AND ppd_end=#" & ppdend & "# "
Set RS1 = Connection.Execute(SQLStmt,RowsUpdated)
The db is accessed thru an odbc connection. This was working fine until we converted the original db to Access 2007 and created a odbc connection for the new db. Is there something in that setup that could be set as Read Only?
P.S. Wasn't sure exactly which category to put this under. If it's not the right one can someone put it to the proper one? Thanks.
24 September 2011 17:00
It's possible it's set as Read Only, that would certainly give that error. Make sure the folder the DB is in allows for updating.
Also, make sure your connection is set correctly, to allow updates (although by default it already should but this will make sure it's set to ReadWrite ):
Connection.Mode = 3
27 September 2011 12:54
Figured it out. The security need to be modified on IIS. that fixed the issue.
Thanks for the info on the Conenction.mode =3. I will keep it in mind for future reference.
- Ditandai sebagai Jawaban oleh J-Bal 27 September 2011 12:54
29 September 2011 14:43
Please elaborate. What security needs to be modified in IIS? and how does one do that? Could you please provide a few steps?
22 Mei 2012 16:58
Please help what needs to be updated in IIS in order to overcome this problem. It's very urgent.
29 Juli 2012 9:10
Hey.. here is the solution:
Hope this helps..!!
06 Agustus 2012 8:38
this is the correct link:
25 September 2012 22:06
It may be a security setting issue. If you had the problem from .asp page, please make sure the database table has access right to Network Service.