Microsoft OLE DB Provider for ODBC Drivers error '80004005'

Answered Microsoft OLE DB Provider for ODBC Drivers error '80004005'

  • 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")

       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.

Semua Balasan