Read only dataset, why?
Posted: Wed 22 Aug 2012 16:39
Using UniDAC 4.1.4 with an Oracle database. I recently switched out the ODAC components to the UniDAC so I know this worked with ODAC. I'm trying to figure out why it won't work with UniDAC.
In a TUniQuery when I try to edit a field value, I get an exception saying "Cannot modify a read-only dataset" while I call DataSet.Edit. There are no custom fields and no persistent fields. I have set up SQLUpdate to edit a specific row based on a key value. Here's the query:
If I remove the outer select and order by and use the following query, there is no exception and I can edit the data just fine.:
Why would the second query work but not the second query? It works fine in ODAC but not UniDAC.
In a TUniQuery when I try to edit a field value, I get an exception saying "Cannot modify a read-only dataset" while I call DataSet.Edit. There are no custom fields and no persistent fields. I have set up SQLUpdate to edit a specific row based on a key value. Here's the query:
Code: Select all
SELECT * FROM
(SELECT *
FROM current_context
WHERE contract_number IS NOT NULL
AND contract_signed IS NULL
UNION
SELECT *
FROM future_context
WHERE contract_number IS NOT NULL
AND contract_signed IS NULL
UNION
SELECT *
FROM context
WHERE effective_date > SYSDATE
AND contract_number IS NOT NULL
AND contract_signed IS NULL
)
ORDER BY contract_number DESC
Code: Select all
SELECT *
FROM current_context
WHERE contract_number IS NOT NULL
AND contract_signed IS NULL
UNION
SELECT *
FROM future_context
WHERE contract_number IS NOT NULL
AND contract_signed IS NULL
UNION
SELECT *
FROM context
WHERE effective_date > SYSDATE
AND contract_number IS NOT NULL
AND contract_signed IS NULL