Microsoft OLE DB Provider for ODBC Drivers error '80004005'
-
23. září 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")
Connection.Open "DSN=timesheet_test;"
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?
Thanks.
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.
Všechny reakce
-
24. září 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
Tom Overton -
27. září 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.
- Označen jako odpověď J-Bal 27. září 2011 12:54
-
29. září 2011 14:43
Hi J-Bal,
Please elaborate. What security needs to be modified in IIS? and how does one do that? Could you please provide a few steps?
-
22. května 2012 16:58
Hi J-Bal
Please help what needs to be updated in IIS in order to overcome this problem. It's very urgent.
Tirumal
-
29. července 2012 9:10
Hey.. here is the solution:
Hope this helps..!!
Thanks,
Prakash
-
6. srpna 2012 8:38
Hey,
this is the correct link:
Thanks
-
25. září 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.