Page 1 of 1

ORA-06502: PL/SQL: numeric or value error

Posted: Tue 21 Dec 2004 10:55
by Guest
Hi!

There is a problem with ODAC 5 (v5.10.0.5 30.06.04) & Delphi 7.

Test sample:

create table a_clients (s_client_no char(7) not null, s_client_name varchar(45));

PACKAGE A_PACKAGE
IS
FUNCTION get_client_name
( client_no IN a_clients.s_client_no%TYPE DEFAULT NULL,
client_name OUT varchar)
RETURN integer;

END;

PACKAGE BODY A_PACKAGE
IS
FUNCTION get_client_name
( client_no IN a_clients.s_client_no%TYPE DEFAULT NULL,
client_name OUT varchar)
RETURN integer
IS
BEGIN
client_name := 'client_name';
return 0;
END;
END;

If I try to do the following in Delphi source -

...
OraStoredProc1.StoredProcName := 'a_package.get_client_name';
OraStoredProc1.Prepare;
OraStoredProc1.ParamByName('client_no').AsString := '0000001';
OraStoredProc1.Execute;
...

error ORA-06502 follows

But it works fine if do one of the following -

specify another data type for fixed char parameter:

...
OraStoredProc1.StoredProcName := 'a_package.get_client_name';
OraStoredProc1.Prepare;
OraStoredProc1.ParamByName('client_no').DataType := ftString;
OraStoredProc1.ParamByName('client_no').AsString := '0000001';
OraStoredProc1.Execute;
...

or specify not max length value for fixed char parameter:

...
OraStoredProc1.StoredProcName := 'a_package.get_client_name';
OraStoredProc1.Prepare;
OraStoredProc1.ParamByName('client_no').AsString := '000001';
OraStoredProc1.Execute;
...


Thanks in advance.

Posted: Thu 23 Dec 2004 08:24
by Paul
What is the Oracle server version?
We got your request and now examines the problem. Unfortunately now we couldn't give you any information. As soon as we solve the problem, we'll let you know.

Posted: Wed 05 Jan 2005 09:33
by shihare
Oracle Server version:

Oracle Database 10g Release 10.1.0.3.0 - 64bit Production

Odac components:

5.10.4.13 24.11.04

Posted: Wed 05 Jan 2005 15:18
by Alex
Send us please small demo project to demonstrate the problem and include script to create server objects to ODAC support address.