Salve ragazzi premetto che sono alle prime armi con Oracle. Ho realizzato in oracle un package all'interno del quale c'è una store procedure con cursore che esegue una semplice select! Quando il risultato della query restituisce un record allora va tutto bene ma quando non restituiesce nessun record viene generata un'eccezione.

il codice della store è questo!

codice:
PROCEDURE Get_User_Logged(usr varchar2,pass varchar2,userlogged OUT USER_CUR) IS
  
    CurTmp USER_CUR;
    NRighe NUMBER(3);
    
    BEGIN
    
        Select count(*) into NRighe From AG_ACCOUNT where usrname=nvl(usr,usrname) and pwd =nvl(pass,pwd);
        
        IF NRighe > 0 THEN
            OPEN CurTmp FOR
                Select * From AG_ACCOUNT where usrname=nvl(usr,usrname) and pwd =nvl(pass,pwd);
            userlogged := CurTmp;  
        END IF;
    END;