form probem ora-06502 [message #281601] |
Sun, 18 November 2007 11:41 |
hemu
Messages: 16 Registered: May 2007
|
Junior Member |
|
|
declare
s varchar2(20);
x varchar2(3);
y varchar2(3);
z varchar2(3);
o number(3);
p number(3);
n number(3);
begin
s:=get_item_property('t1',background_color);
select length(s) into n from dual;
select instr(s,'g') into o from dual;
select instr(s,'b') into p from dual;
break;
o:=o-1;
select substr(s,2,o) into x from dual;
message(x);
/*break;
select substr(s,o+1,p-1) into y from dual;
break;
select substr(s,p+1) into z from dual;
message(y);
message(z);*/
message(' ');
end;
in run time there is proble error orrcured ora-o6502
thax in advance
|
|
|
Re: form probem ora-06502 [message #281610 is a reply to message #281601] |
Sun, 18 November 2007 13:19 |
|
Littlefoot
Messages: 21823 Registered: June 2005 Location: Croatia, Europe
|
Senior Member Account Moderator |
|
|
Oracle | ORA-06502 PL/SQL: numeric or value error string
Cause: An arithmetic, numeric, string, conversion, or constraint error occurred. For example, this error occurs if an attempt is made to assign the value NULL to a variable declared NOT NULL, or if an attempt is made to assign an integer larger than 99 to a variable declared NUMBER(2).
Action: Change the data, how it is manipulated, or how it is declared so that values do not violate constraints.
|
A hint: you've declared variables that are too small in size to accept values you'd like to store into them. For example, test it with the RED background (r255g0b0) and see what happens. Do NOT run it through Forms, use paper and pencil instead.
|
|
|