Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.tools -> Re: exception handling with explicit cursors?

Re: exception handling with explicit cursors?

From: Sybrand Bakker <postbus_at_sybrandb.demon.nl>
Date: Mon, 28 Aug 2000 06:58:12 +0200
Message-ID: <967439713.12458.0.pluto.d4ee154e@news.demon.nl>

for explicit cursors use
fetch <cursor> into ....
if <cursor>%notfound then

Hth,

Sybrand Bakker, Oracle DBA

"Jules" <newsreply@[dontspamme]szemtech.com> wrote in message news:8oci48$j05$1_at_towncrier.cc.monash.edu.au...
> Can it be done?
>
> ie, this works:
> DECLARE
> ItemDESC item.itemdesc%TYPE;
> CurrItemID BINARY_INTEGER;
> BEGIN
> CurrItemID := 890;
> SELECT item.itemdesc
> INTO ItemDESC
> FROM item
> WHERE item.itemid = 890;
> DBMS_OUTPUT.PUT_LINE('Item ID: ' || TO_CHAR(CurrItemID) || '
 Item
> Description: ' || ItemDESC);
> EXCEPTION
> WHEN NO_DATA_FOUND THEN
> DBMS_OUTPUT.PUT_LINE('No data was found');
> END;
> /
>
> -- which handles the NO_DATA_FOUND case for an implicit cursor...
> but when an explicit cursor is used... no error is triggered when no rows
> are returned...
>
> can anyone help?
>
> Jules
>
>
>
>
Received on Sun Aug 27 2000 - 23:58:12 CDT

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US