Print Thread
Page 2 of 5 1 2 3 4 5
Re: ora-01480
Ruudbern #37641 03/19/10 10:29 AM
Joined: Aug 1999
Posts: 22,208
Member
Offline
Member
Joined: Aug 1999
Posts: 22,208
Just to be sure: have you set TOracleSession.BytesPerCharacter to bcAutoDetect?


Marco Kalter
Allround Automations
Re: ora-01480
Marco Kalter #37685 03/23/10 07:18 PM
Joined: Mar 2005
Posts: 2
Tokyo, Japan
Member
Offline
Member
Joined: Mar 2005
Posts: 2
Tokyo, Japan
Hello, Marco,
Since some DOA users in JAPAN reported this same ORA-01480 error,
I'm currently investigating this with a small sample program.

With Server:
NLS_CHARACTERSET AL32UTF8
NLS_LENGTH_SEMANTICS BYTE
and Client:
NLS_LANG=JAPANESE_JAPAN.JA16SJISTILDE

I get ORA-01480 when I update a
VARCHAR2 (2020) column with a long (l>=1001) string.

BytesPerCharacter = 4,
MaxVarChar = 4000 / 4 = 1000.
----------
I've found that Session.MaxVarChar is so small that
TOracleQuery.BindVariables truncates the buffer too short.
----------
There seems to be a workaround.

function TOracleSession.MaxVarchar: Integer;
begin
if UseOCI80 then Result := 4000 else Result := 2000;
Result := Result div CharacterSize;
Result := 16000; //<< HERE is the worlkaround.
end;

By setting the MaxVarchar large enough,
DOA won't truncate the input varchar2 string any more.

But I'm not sure it is safe to do so yet.

Is this safe to set MaxVarchar = 160000 so that
it's large enough for VARCHAR2(4000 CHAR ) in AL32UTF8 ?

I hope the only bad thing with MaxVarchar=16000 is
larger memory consumption smile

Re: ora-01480
Kunikazu Okada #37688 03/24/10 10:32 AM
Joined: Aug 1999
Posts: 22,208
Member
Offline
Member
Joined: Aug 1999
Posts: 22,208
Thanks, we'll check it out.


Marco Kalter
Allround Automations
Re: ora-01480
Marco Kalter #37710 03/26/10 02:09 PM
Joined: Jul 2002
Posts: 71
R
Member
OP Offline
Member
R
Joined: Jul 2002
Posts: 71
Yes the TOracleSession.BytesPerCharacter = bcAutoDetect.
I wil make a test program to check the workaround Kunikazu suggests. (thanks in advance for sharing this.)

Marco can you let me know if this is save to use?

Re: ora-01480
Ruudbern #37714 03/29/10 09:57 AM
Joined: Aug 1999
Posts: 22,208
Member
Offline
Member
Joined: Aug 1999
Posts: 22,208
I cannot yet say if it is safe. We have not yet tested this.


Marco Kalter
Allround Automations
Re: ora-01480
Marco Kalter #37730 04/01/10 06:03 AM
Joined: Jul 2002
Posts: 71
R
Member
OP Offline
Member
R
Joined: Jul 2002
Posts: 71
Hi Marco,

the workaround from Kunikazu does the trick. When can we expect an answer if it is ok to use in an productional environment.

thanks in advance

Ruud

Re: ora-01480
Ruudbern #37734 04/01/10 09:32 AM
Joined: Aug 1999
Posts: 22,208
Member
Offline
Member
Joined: Aug 1999
Posts: 22,208
I'm not sure yet. This will require some extensive testing.


Marco Kalter
Allround Automations
Re: ora-01480
Marco Kalter #37736 04/01/10 09:41 AM
Joined: Jul 2002
Posts: 71
R
Member
OP Offline
Member
R
Joined: Jul 2002
Posts: 71
Ok I understand,

i have to be more patient then "Szell" the dentist in "The Marathon man" ... "is it safe?" ;-)

kind regards

Re: ora-01480
Ruudbern #38995 11/04/10 12:27 PM
Joined: May 2001
Posts: 53
Enschede, The Netherlands
F
Member
Offline
Member
F
Joined: May 2001
Posts: 53
Enschede, The Netherlands
Has this issue been resolved yet?


Frans
Re: ora-01480
F.Hinlopen #39146 12/08/10 11:22 AM
Joined: Jun 2005
Posts: 37
Norway
A
Member
Offline
Member
A
Joined: Jun 2005
Posts: 37
Norway
We are facing the same issue - what is the status of this issue?
Can we expect a fix in the soon future?

Page 2 of 5 1 2 3 4 5

Moderated by  support 

Link Copied to Clipboard
Powered by UBB.threads™ PHP Forum Software 7.7.4
(Release build 20200307)
Responsive Width:

PHP: 7.1.33 Page Time: 0.117s Queries: 14 (0.055s) Memory: 2.5609 MB (Peak: 3.0380 MB) Data Comp: Off Server Time: 2024-05-05 20:46:05 UTC
Valid HTML 5 and Valid CSS