Skip to Main Content

Oracle Database Discussions

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

stored procedure and coldfusion.

549779Feb 6 2007 — edited Feb 6 2007
Hi all,

My query is related with Oracle and coldfusion. I have got to write a stored procedure for updating a table. In this I have to raise an exception if the field i give for does not exist. Can anyone give an example code for this? I also want to know how it is called in a cfm page.

Following is the stored procedure i have written

create or replace package group_pack
as
procedure group_update
(
pt_group_id in group.group_id%type,
pt_group_name in group.group_name%type
);
end;

create or replace package body group_pack
as
procedure group_update
(
pt_group_id in group.group_id%type,
pt_group_name in group.group_name%type
)
as
begin
update group
set group_id = pt_group_id,
group_name = pt_group_name
where group_id = pt_group_id;
exception
when no_data_found then (what to code)
end;
end;

In this in the (what to code) part i tried returning zero...but then procedures do not return values. Then I tried to RAISE exception, which also showed error.

Also in the cfm page what should be done with the <cfstoredproc> </cfstoredproc>tags. How should it be reflected.....

Please do give a solution to my problem.....

Thanking in advance....

Regards,
Aswathy.
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Mar 6 2007
Added on Feb 6 2007
4 comments
553 views