Home » RDBMS Server » Server Utilities » showing oracle messages
showing oracle messages [message #68976] Sat, 06 October 2001 06:03 Go to next message
Amit
Messages: 166
Registered: February 1999
Senior Member
hello sir/mam
i have to call this package from asp
In the third select statement i have to generate an message in the exception no_data_found , telling user something
how do i show this message in asp
regards
amit

PACKAGE BODY Process_Enrollments IS

PROCEDURE Enroll_Student
(
a NUMBER;
b NUMBER;
c NUMBER;
)

BEGIN

select col into a from userpass;

select pass into b from userpass1;

begin
select coll into c from userpass2
where name = 'amit'

exception

WHEN NO_DATA_FOUND THEN

-- here i have to populate a msg to
inform the user somehing something
end;

END Enroll_Student;
END Process_Enrollments;

----------------------------------------------------------------------
Re: showing oracle messages [message #68994 is a reply to message #68976] Thu, 11 October 2001 06:58 Go to previous message
oraboy
Messages: 97
Registered: October 2001
Member
one thing you can change your procedure to function and return a value (o) or FALSE and check from your calling code

or you can have a out argument added to procedure and assign a specific value when NO_DATA_FOUND fires.you can check for the value of out parameter in your calling code and decide according whether to show an alert to user or not

Hope it helps

oraboy

----------------------------------------------------------------------
Previous Topic: Re: importing excel file into Oracle
Next Topic: copy from a production db to a test - how to?
Goto Forum:
  


Current Time: Thu Mar 28 17:28:56 CDT 2024