ODAC adding quotes wrongly
Posted: Mon 09 Nov 2020 16:07
Hello,
If I connect a TSmartQuery to a TDataset and connect that to a grid, I can edit table data in the grid when the query includes the ROWID. In most cases, it works great.
However, if the table is a schema with a dot, like "J.DORLON", and the query is like:
Select e.*, e.rowid from "J.DORLON".EMP e
...then I get an error when I try to edit the data in the grid. ORA-01741 Ilegal zero-length identifier
The problem is that when ODAC does the lock query, it looks like:
SELECT ...fields....
FROM ""J"."DORLON"".EMP
WHERE ROWID = ....
FOR UPDATE NOWAIT
I tried to solve it with OptionsDS.QuoteNames := true, but that did not help
thanks
'
If I connect a TSmartQuery to a TDataset and connect that to a grid, I can edit table data in the grid when the query includes the ROWID. In most cases, it works great.
However, if the table is a schema with a dot, like "J.DORLON", and the query is like:
Select e.*, e.rowid from "J.DORLON".EMP e
...then I get an error when I try to edit the data in the grid. ORA-01741 Ilegal zero-length identifier
The problem is that when ODAC does the lock query, it looks like:
SELECT ...fields....
FROM ""J"."DORLON"".EMP
WHERE ROWID = ....
FOR UPDATE NOWAIT
I tried to solve it with OptionsDS.QuoteNames := true, but that did not help
thanks
'