Results 1 to 2 of 2
  1. #1
    Join Date
    Feb 2004
    Location
    Germany
    Posts
    136

    Unanswered: creating messages or log-files

    Hello All!

    I have a question to my code:

    PHP Code:
    CREATE OR REPLACE PROCEDURE PRC_INS_RESERVE  
    (         pIdFeature VIEW_RESERVE.ID_FEATURE%TYPE,
           
    pNumLic       VIEW_RESERVE.NUMLIC%TYPE,
           ...
    )
    AS
             
    NumAvail NUMBER;
    BEGIN     
         
        EXECUTE IMMEDIATE 
    'SELECT NUM_AVAIL FROM FEATURE_AVAILABLE WHERE ID_FEATURE = ' || pIdFeature INTO NumAvail;      
         
            
        IF 
    pNumLic <= NumAvail THEN
              INSERT INTO 
    ...;
                              
            IF 
    SQL%ROWCOUNT != 0 THEN                  
               UPDATE FEATURE_AVAILABLE SET NUM_AVAIL 
    NUM_AVAIL pNumLic WHERE ID_FEATURE pIdFeature;
            
    END IF; 
            
                              
        
    ELSIF pNumLic NumAvail THEN
               RAISE_APPLICATION_ERROR
    (-20001'There are '|| NumAvail || ' features available'); 

        ELSE
               
    RAISE_APPLICATION_ERROR(-20000'test_err_msg');
        
    END IF; 
    END;


    Now is my question: how can i modify my code to get instead of error-box-message a:
    - info-box , or
    - no event -> errorlog-file


    Thanks in advance!
    Regards,
    Julia

  2. #2
    Join Date
    Apr 2003
    Location
    NY
    Posts
    208
    Instead of Raising an Application Error, call a stored procedure that writes to an error_log. You cause use Utl_File to create a file to write the errors too.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •