[Oracle] ORA-06502 conversion error

Solved
AssassinTourist Posted messages 409 Registration date   Status Contributeur Last intervention   -  
DROE Posted messages 148 Registration date   Status Membre Last intervention   -
Hello,

I am working on an Oracle 11g database. I have packages that work fine... However, I am encountering a random error o__O To debug, I am directly calling the troublesome procedure like this:
set serveroutput on execute pkg.update_obj(115);


With update_obj defined as follows:
procedure update_obj( in_var number; ) is begin dbms_output.put_line('entering the method'); end;


The first time I run it, I get the following error:
Error starting at line 2 of command: execute pkg.update_obj(115); Error report: ORA-06502: PL/SQL: numeric or value error: character to number conversion error ORA-06512: at "pkg", line 41 ORA-06512: at line 1 06502. 00000 - "PL/SQL: numeric or value error%s" *Cause: *Action:


Without changing anything, when I run it again, I get this (like the following runs):
anonymous block completed


I make a space in my pkg, save it, and it starts over: 1 error then no errors.

I don't know what to try anymore to debug :$
Thank you very much to those who could give me ideas!

Configuration: Windows XP, Vista, and 7
Latest Firefox

--
Resolving it when it’s resolved is also cool =)

2 réponses

DROE Posted messages 148 Registration date   Status Membre Last intervention   48
 
Hello,

here's an idea.
Your error is not a random error, I think.

it crashes on the first execution and then works, so I
would rather think of an uninitialized variable on the first launch that becomes initialized afterwards :)

an uninitialized variable takes the "value" NULL

DROE
--
Experience is the name everyone gives to their mistakes.
1