Cursor.Recordcount

Ivan Smahin ivan_smahin at paradigmasoft.com
Mon Feb 2 10:00:53 CST 2009


Hello Bart,

Monday, February 2, 2009, 5:41:34 PM, you wrote:

> Wow

> now that is VERY interesting information (and deserves to be mentioned
> in the WIKI).

> so I can do this inside a sp :
> ------
> create or replace sp

> begin

> exception

> end
> begin

> exception

> end
> ---------
> or is it
> ------
> create or replace sp
> begin
> begin

> exception

> end
> begin

> exception

> end
> end
> --------

> ??

> tia

> Bart

.........
 BEGIN
     -- If no records in the cursor the next line will throw ERR_CURSOR_WRONG_POSITION
     FETCH FIRST vcur INTO ...;
 EXCEPTION WHEN ERR_CURSOR_WRONG_POSITION THEN
    LEAVE
 END
                                                             
 LOOP
     BEGIN
        FETCH NEXT vcur INTO ...;

     EXCEPTION WHEN ERR_CURSOR_WRONG_POSITION THEN
        print 'Cursor.Next Loop Exception';
        LEAVE
     END
 END LOOP
.......


-- 
Best regards,
Ivan Smahin 
Senior Software Engineer
Paradigma Software, Inc
Valentina - The Ultra-Fast Database
http://www.valentina-db.com



More information about the Valentina mailing list