D
DanB
I have an issue with a query that I cannot figure out the answer to. I keep
getting the error 'Operation must use an updateable query'. The query I am
running is:
UPDATE DGBTestVariations
SET DGBTestVariations.JURISDICTION =
IIF(DGBTestVariations.JURISDICTION = "NoMoneyMuni",
(SELECT DGBJurisdictionCOO.JurisCodes FROM DGBJurisdictionCOO WHERE
DGBJurisdictionCOO.ID=3),
IIF(DGBTestVariations.JURISDICTION =
"Municipalities", (SELECT DGBJurisdictionCOO.JurisCodes FROM
DGBJurisdictionCOO WHERE DGBJurisdictionCOO.ID=2) ,
IIF(DGBTestVariations.JURISDICTION = "County",
(SELECT DGBJurisdictionCOO.JurisCodes FROM DGBJurisdictionCOO WHERE
DGBJurisdictionCOO.ID=1) ,
IIF(DGBTestVariations.JURISDICTION IS
NULL, "ANY", DGBTestVariations.JURISDICTION
)
)
)
)
The DGBTestVariations table can be updated with a string "this works", but
when I try to update it programatically it gives me the error. The table
DGBJurisdictionCOO is a table I have built specifically adding an Indexed ID
field that does not allow duplicates and is the key for the table. I tried
selecting where the group I wanted matched a string I input, and then
switched to this when it kept giving me the error. I was thinking maybe it
was erroring out because it wasn't unique or something, even though it is.
So when I went to this code using the key field from the table, and it still
doesn't work, I decided to ask the experts.
getting the error 'Operation must use an updateable query'. The query I am
running is:
UPDATE DGBTestVariations
SET DGBTestVariations.JURISDICTION =
IIF(DGBTestVariations.JURISDICTION = "NoMoneyMuni",
(SELECT DGBJurisdictionCOO.JurisCodes FROM DGBJurisdictionCOO WHERE
DGBJurisdictionCOO.ID=3),
IIF(DGBTestVariations.JURISDICTION =
"Municipalities", (SELECT DGBJurisdictionCOO.JurisCodes FROM
DGBJurisdictionCOO WHERE DGBJurisdictionCOO.ID=2) ,
IIF(DGBTestVariations.JURISDICTION = "County",
(SELECT DGBJurisdictionCOO.JurisCodes FROM DGBJurisdictionCOO WHERE
DGBJurisdictionCOO.ID=1) ,
IIF(DGBTestVariations.JURISDICTION IS
NULL, "ANY", DGBTestVariations.JURISDICTION
)
)
)
)
The DGBTestVariations table can be updated with a string "this works", but
when I try to update it programatically it gives me the error. The table
DGBJurisdictionCOO is a table I have built specifically adding an Indexed ID
field that does not allow duplicates and is the key for the table. I tried
selecting where the group I wanted matched a string I input, and then
switched to this when it kept giving me the error. I was thinking maybe it
was erroring out because it wasn't unique or something, even though it is.
So when I went to this code using the key field from the table, and it still
doesn't work, I decided to ask the experts.