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