updatable query demanded by Access - TechRepublic
General discussion
October 4, 2002 at 02:34 AM
john_wills

updatable query demanded by Access

by john_wills . Updated 23 years, 9 months ago

UPDATE JWXLSTBL SET Prov_ID = Auto – 1 + (SELECT Next_Prime FROM dbo_SEQUENCE WHERE DATABASE_ = ‘provider’);
When I run the above query in Access 97 or 2000 I get the message “Operation must use an updatable query”. The nested SELECT does yield exactly one value when run by itself. I am able to update the table JWXLSTBL, and it does have a column Prov_ID. I get appropriate results if I use a constant instead of the SELECT subquery.
1. What might I be doing wrong in SQL?
2. Is there a way of running the nested SELECT and putting the result into a VBA variable so that I can construct the UPDATE with a constant? This can be done in Cobol, but I cannot find a way of doing it in VBA.

This discussion is locked

All Comments