ODAC adding quotes wrongly

Discussion of open issues, suggestions and bugs regarding ODAC (Oracle Data Access Components) for Delphi, C++Builder, Lazarus (and FPC)
Post Reply
jdorlon
Posts: 202
Joined: Fri 05 Jan 2007 22:07

ODAC adding quotes wrongly

Post by jdorlon » 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
'

MaximG
Devart Team
Posts: 1822
Joined: Mon 06 Jul 2015 11:34

Re: ODAC adding quotes wrongly

Post by MaximG » Tue 10 Nov 2020 15:46

Please send us the compete script for creating the "J.DORLON" schema so that we could test our components under the same conditions.

jdorlon
Posts: 202
Joined: Fri 05 Jan 2007 22:07

Re: ODAC adding quotes wrongly

Post by jdorlon » Tue 10 Nov 2020 15:47

The only thing that matters is the dot in the name, but this is how I created the user.

Code: Select all

create user "J.DORLON" identified by x;
grant dba to "J.DORLON";
grant create session to "J.DORLON";

MaximG
Devart Team
Posts: 1822
Joined: Mon 06 Jul 2015 11:34

Re: ODAC adding quotes wrongly

Post by MaximG » Thu 12 Nov 2020 11:52

Thank you for the information. We've reproduced the issue and fixed it. The fix will be included in the next build of our product. As a temporary solution, we'll send you an email with the download links for the nightly build with all necessary changes.

jdorlon
Posts: 202
Joined: Fri 05 Jan 2007 22:07

Re: ODAC adding quotes wrongly

Post by jdorlon » Thu 12 Nov 2020 13:41

Great, thank you Maxim!

MaximG
Devart Team
Posts: 1822
Joined: Mon 06 Jul 2015 11:34

Re: ODAC adding quotes wrongly

Post by MaximG » Fri 13 Nov 2020 14:38

We have sent you an email with the download links.

jdorlon
Posts: 202
Joined: Fri 05 Jan 2007 22:07

Re: ODAC adding quotes wrongly

Post by jdorlon » Fri 13 Nov 2020 16:29

Confirmed fixed in nightly build, thanks again.

Post Reply