Page 1 of 1

Getting ORA-06502: PL/SQL: numeric or value error: character string buffer too small

Posted: Wed 13 Mar 2019 10:25
by kithran
I'm getting ORA-06502: PL/SQL: numeric or value error: character string buffer too small when using ODAC 9.7.28 however the same code runs without issue on 5.80.0.42.

SQL Monitor shows the following:

Code: Select all

19      11:43:32  SQL Execute: begin  :result := sys.dbms_transaction.local_transaction_id; end;
20      11:43:32  :result(VARCHAR[0])=<NULL>
21      11:43:32  Error: ORA-06502: PL/SQL: numeric or value error: character string buffer too small
ORA-06512: at line 1
The Delphi function is as follows:

Code: Select all

function GetTransactionID(ASession: TOraSession) : string;
begin
  Result := '';
  with ASession do
    if Connected then
    begin
      ExecSQL('begin' +
              '  :Result := sys.dbms_transaction.local_transaction_id; ' +
              'end;', []);
      Result :=  ParamByName('Result').AsString;
    end;
end;

Re: Getting ORA-06502: PL/SQL: numeric or value error: character string buffer too small

Posted: Mon 18 Mar 2019 13:05
by MaximG
We have checked the work of ODAC 10.3.9 according to your description and found no issues. Please check the work of your project when using ODAC 10.3.9. If the error is reproduced in this case as well, please compose and send a simple test example during execution of which the issue occurs to us. For this, please use the e-support form https://www.devart.com/company/contactform.html