Why the string data is cut off?

Discussion of open issues, suggestions and bugs regarding UniDAC (Universal Data Access Components) for Delphi, C++Builder, Lazarus (and FPC)
Post Reply
dionic
Posts: 11
Joined: Tue 12 Apr 2011 05:16

Why the string data is cut off?

Post by dionic » Sat 21 May 2011 08:45

Hello devart team.

I use the unidac components for lazarus. I work under Linux system.
When I try connect to Oracle DB all is good. And when I try execute simple queries like this

Code: Select all

select id, name from my_table

all is good too. Field "name" contains data with cirrilic symbols and don't cutt off in resulset.

But if I try execute queries like

Code: Select all

select decode(ALPHA_TYPE, 1, 'да', 0, 'нет') ALPHA_VAL from SCHET_FR
the string data is cut off.

In my resulset the field ALPHA_VAL contains only half symbols from string 'да' - 'д' or 'нет' - 'н'.

My oracle system variable NLS_LANG is AMERICAN_CIS.UTF8.

Please help to solve this problem.

AlexP
Devart Team
Posts: 5530
Joined: Tue 10 Aug 2010 11:35

Post by AlexP » Mon 23 May 2011 11:13

Hello,

I cannot reproduce the problem.
Please specify the following information:
the exact UniDAC version
the exact version of the Oracle client and server
the exact version of Lazarus and FPC
the name and version of Linux
Also please try to execute the following SQL query:

Code: Select all

with SCHET_FR as
select cast(1 as NUMBER(1)) as ALPHA_TYPE from dual
union all
select cast(0 as NUMBER(1)) as ALPHA_TYPE from dual )
select decode(ALPHA_TYPE, 1, ''да'', 0, ''нет'') as ALPHA_VAL from SCHET_FR
if data is displayed correctly, please send a small sample demonstrating the problem including a script to create and fill the tables to alexp*devart*com.

P.S. I was trying to reproduce your problem with UniDAC 3.70.0.17, Oracle 11 R2, Lazarus 0.9.30, FPC 2.4.2, OpenSuse 11.4 .

dionic
Posts: 11
Joined: Tue 12 Apr 2011 05:16

Post by dionic » Sat 04 Jun 2011 07:47

Hi AlexP.

I solve problem with query like :

Code: Select all

select decode(ALPHA_TYPE, 1, 'да', 0, 'нет') ALPHA_VAL from SCHET_FR s
I just add SpecificOptions.Values['CharSet']:= 'utf8'; to my connection component. This problem appears under windows system in the lazarus 9.30, Oracle 11g and UniDac 3.70.

AlexP
Devart Team
Posts: 5530
Joined: Tue 10 Aug 2010 11:35

Post by AlexP » Wed 08 Jun 2011 09:30

Hello,

I cannot reproduce the problem.

Please send me results of the following queries:

SELECT USERENV ('language') from dual;

SELECT * FROM V$NLS_PARAMETERS;

Post Reply