locked
Oracle Procedure %ROWTYPE RRS feed

  • Question

  • I have a procedure in Oracleand I do not know how to call or howI pass the parameters I'm usingVBNET but can I also be in C#.

        PROCEDURE PRC_GRAVA_MODELOEMAIL
        (
            P_REC_MODELOEMAIL IN OUT E_MODELOEMAIL%ROWTYPE
        )
        IS
        BEGIN
                IF P_REC_MODELOEMAIL.MODELOEMAIL_ID IS NULL THEN
               SELECT E_MODELOEMAIL_SEQ.NEXTVAL
               INTO P_REC_MODELOEMAIL.MODELOEMAIL_ID
               FROM DUAL;
            END IF;
           
                BEGIN
                INSERT INTO E_MODELOEMAIL VALUES P_REC_MODELOEMAIL;
            EXCEPTION
                 WHEN DUP_VAL_ON_INDEX THEN
                      UPDATE E_MODELOEMAIL
                      SET ROW = P_REC_MODELOEMAIL
                      WHERE
                      MODELOEMAIL_ID = P_REC_MODELOEMAIL.MODELOEMAIL_ID;
            END;
           
        EXCEPTION
             WHEN OTHERS THEN
                  ROLLBACK;
                  RAISE_APPLICATION_ERROR(-20000, 'ERRO - MODELOEMAIL_ID: '||P_REC_MODELOEMAIL.MODELOEMAIL_ID||CHR(10)||SQLERRM);     
        END;

                   
    Monday, May 14, 2012 1:32 PM

Answers