Junk data appearing after literals

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

Junk data appearing after literals

Post by jdorlon » Fri 16 Oct 2020 13:53

Hello,

I am using the latest version of ODAC. This problem did not occur with version 10.4, but I don't know exactly when it started.

Compiling in either 32 or 64 bit VCL, RAD Studio 10.1 Berlin.

I have reproduced this with multiple Oracle versions (12.2 and 19.0) and with multiple database character sets (EE8ISO8859P2 and UTF8)

Just run these SQLs, in order, in a TSmartQuery connected to a TDBGrid.

Code: Select all

alter session set "_adjust_literal_replacement"=FALSE;

alter session set cursor_sharing = 'FORCE';

SELECT '1' AS col1,
       'TEST' AS col2,
       cast ('1' AS CHAR (8)) AS col1_aschar,
       cast ('TEST' AS CHAR (8)) AS col2_aschar
FROM dual;
The problem is that I get some junk characters after the literals in the first two columns.

For example, in the first column, I get : 1í
and in the second column, I get TEST (edit: there was some junk data after this too but I guess the forum removed it)

The junk data changes if I re-execute the SELECT. And it only seems to happen if I select literals. When I select CHAR values from a table, the problem does not occur.

Thanks.

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

Re: Junk data appearing after literals

Post by MaximG » Tue 20 Oct 2020 15:30

We couldn't reproduce the issue in our environment. We tested ODAC with Oracle 19c with NLS_CHARACTERSET=AL32UTF8. Please send us the source code of your example and the NLS parameters of your Oracle server.
For your convenience, please use the e-support form https://www.devart.com/company/contactform.html

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

Re: Junk data appearing after literals

Post by jdorlon » Tue 20 Oct 2020 17:40

Thank you, I have sent a demo app using the e-support forum.

Post Reply