I am trying to update local Access 2007 table with records from BE SQL Server 2012 Express. My steps here:
In SQL Server exists Stored Procedure with 4 parameter
Access always treats an UPDATE
which includes a joined pass-through query as read-only. And that holds true even when the UPDATE
does not attempt to alter values in the pass-through.
As you mentioned in a comment, you could store the pass-through result set in an Access table. Joining that table in place of the pass-through in the UPDATE
should work. However, you also mentioned that seems a bit dirty. No argument there. :-)
So perhaps you would prefer to use DLookup
to fetch qryTemp.GraphHrs values for the UPDATE
. This one should work, but I don't know whether the execution speed will be acceptable ...
UPDATE tbl_tmp_Tab_s
SET tbl_tmp_Tab_s.GraphHrs =
DLookup(
"GraphHrs",
"qryTemp",
"EmplCodeID0=" & EmplCodeID0
);
If the datatype of EmplCodeID0 is text rather than numeric, include quotes around its value ...
"EmplCodeID0='" & EmplCodeID0 & "'"