error ora-105100
vinodhps, July 14, 2003 - 3:14 am UTC
Hi Tom,
In my forms mail form login screen iam getting this error message as ora-105100 i could not able to trace the message,
it was also not availabe in oerr or any where in google too..
do you have any idea about that tom
Thanking you
July 14, 2003 - 9:20 am UTC
time to call support I suppose.
Some control available through TRUE/FALSE
andrew, July 14, 2003 - 2:55 pm UTC
Connected to:
Oracle8i Enterprise Edition Release 8.1.7.3.0 - Production
With the Partitioning option
JServer Release 8.1.7.3.0 - Production
SQL> DECLARE
2 x NUMBER;
3 BEGIN
4 x := 1 / 0;
5 EXCEPTION
6 WHEN OTHERS THEN
7 raise_application_error (-20501, 'Whoops!', FALSE);
8 END;
9 /
DECLARE
*
ERROR at line 1:
ORA-20501: Whoops!
ORA-06512: at line 7
SQL> DECLARE
2 x NUMBER;
3 BEGIN
4 x := 1 / 0;
5 EXCEPTION
6 WHEN OTHERS THEN
7 raise_application_error (-20501, 'Whoops!', TRUE);
8 END;
9 /
DECLARE
*
ERROR at line 1:
ORA-20501: Whoops!
ORA-06512: at line 7
ORA-01476: divisor is equal to zero
July 15, 2003 - 1:00 am UTC
that doesn't get rid of the stuff the original poster wanted to get rid of.
"i don't want the other ora-06512....."
Pure SQL solution
Donat Callens, July 29, 2022 - 7:27 am UTC
It is possible to achieve this in pure SQL by cheating a little and resorting to compilation flags. You output the message and set the flag. Then you raise the error based on the flag, but you remove the output first. You can expand this code for as many different errors as needed.
SET serveroutput ON feedback OFF
DECLARE
my_number NUMBER;
numeric_error EXCEPTION;
PRAGMA exception_init ( numeric_error, -06502 );
BEGIN
my_number := 'a';
--
dbms_output.put_line('This line is line never reached');
EXCEPTION
WHEN numeric_error THEN
dbms_output.put_line('ORA-20001: Please use a number!');
EXECUTE IMMEDIATE q'~ALTER SESSION SET PLSQL_CCFLAGS = 'error_20001_raised:TRUE'~';
END;
/
WHENEVER SQLERROR EXIT sql.sqlcode -- ensures the exit code is set
SET termout OFF -- disables the output
BEGIN
$IF $$error_20001_raised $THEN
raise_application_error(-20001, 'Please use a number');
$END
NULL;
END;
/
July 29, 2022 - 3:30 pm UTC
I'm not following; that's all PL/SQL - how is this pure SQL? And how can you use this approach for PL/SQL in compiled packages/procedures/functions?
wrong wording
Donat Callens, August 01, 2022 - 6:40 am UTC
I'm not following; that's all PL/SQL - how is this pure SQL? And how can you use this approach for PL/SQL in compiled packages/procedures/functions?
I'm terribly sorry, I meant to say SQL*Plus. not just SQL. It is for SQL scripts usage only, not for compiled code.
August 01, 2022 - 3:09 pm UTC
Ahhh, that makes more sense :)