DEQUEUE procedure problem (never stoped)

create or replace
PROCEDURE deq_proc2 IS
queue_options DBMS_AQ.DEQUEUE_OPTIONS_T;
message_properties DBMS_AQ.MESSAGE_PROPERTIES_T;
message_id RAW(2000);
new_data BOOLEAN := TRUE;
my_message bombac.queue_message_type;
no_messages EXCEPTION;
next_trans EXCEPTION;
pragma exception_init (next_trans, -25235);
pragma exception_init (no_messages, -25228);
BEGIN
queue_options.wait := 1;
WHILE (new_data) LOOP
BEGIN
DBMS_AQ.DEQUEUE(
queue_name => 'bombac.message_queue',
dequeue_options => queue_options,
message_properties => message_properties,
payload => my_message,
msgid => message_id );
queue_options.navigation := DBMS_AQ.NEXT;
DBMS_OUTPUT.PUT_LINE(
'Dequeued no: ' || my_message.no);
DBMS_OUTPUT.PUT_LINE(
'Dequeued title: ' || my_message.title);
DBMS_OUTPUT.PUT_LINE(
'Dequeued text: ' || my_message.text);
COMMIT;
EXCEPTION
WHEN next_trans THEN
queue_options.navigation := DBMS_AQ.NEXT_TRANSACTION;
WHEN no_messages THEN
new_data := FALSE;
DBMS_OUTPUT.PUT_LINE('No more data');
WHEN OTHERS THEN
new_data := FALSE;
DBMS_OUTPUT.PUT_LINE('No more data');
END;
END LOOP;
END;
but i never get message "No more data". Procedure waiting for new data all the time. I want that if quee has no message "No more data" will be shown.
i am writting to quee like:
EXEC enq_proc2(2,'test','test');
COMMIT;
and read like:
SET SERVEROUTPUT ON SIZE 100000
EXEC deq_proc2();

Hi,
Change the code portion
queue_options.wait := 1;
WHILE (new_data) LOOP
BEGIN
DBMS_AQ.DEQUEUE(
queue_name => 'bombac.message_queue',
dequeue_options => queue_options,
message_properties => message_properties,
payload => my_message,
msgid => message_id );
queue_options.navigation := DBMS_AQ.NEXT;
TO
--queue_options.wait := 1;
queue_options.wait             := DBMS_AQ.NO_WAIT;
WHILE (new_data) LOOP
BEGIN
-- queue_options.navigation := DBMS_AQ.NEXT;
queue_options.navigation             := DBMS_AQ.FIRST_MESSAGE;
queue_options.dequeue_mode     := DBMS_AQ.REMOVE;
DBMS_AQ.DEQUEUE(
queue_name => 'bombac.message_queue',
dequeue_options => queue_options,
message_properties => message_properties,
payload => my_message,
msgid => message_id );
and try
Thanks,
Merz

Similar Messages

  • Re   Java Stored Procedure Problem

    Ben
    There appear to be some problem with the forum. It doesn't want to show my response to your post with the subject "Java Stored Procedure Problem". See the answer to this thread for an example of how to do this...
    Is there a SAX parser with PL/SQL??

    Ben
    There appear to be some problem with the forum. It doesn't want to show my response to your post with the subject "Java Stored Procedure Problem". See the answer to this thread for an example of how to do this...
    Is there a SAX parser with PL/SQL??

  • Hey i have this problem with my mac.. that its on its own shuts itself whenever i m using google chrome..i updated to yosemite but the problem never ended and i m experiecing unexplained shutdowns

    hey i have this problem with my mac.. that its on its own shuts itself whenever i m using google chrome..i updated to yosemite but the problem never ended and i m experiecing unexplained shutdowns

    Hi doctor.saddam,
    If your MacBook Pro is shutting down unexpectedly, I would suggest that you troubleshoot using the steps in this article - 
    OS X: When your computer spontaneously restarts or displays "Your computer restarted because of a problem." - Apple Support
    Thanks for using Apple Support Communities.
    Best,
    Brett L 

  • In completion procedure Problem

    i am using one incompletion procedure for two sales documnet types Ex: X & Y both are working for different sales organizations
    1)When ia m doing Sales order with X document it is not getting the partner "sales tax form type" while saving
    2) in Y sales document type it is getting the partner " Sales tax form type "  while saving
    can any one guide how to over come this
    Kishore

    Hi ,
              This does not sound like an Incompletion procedure problem. They might have used an user exit(Userexit_save_document_ prepare) to populate this partner function when the sales org is "Y". Kindly please check with the help of abap'er If you can not.
    Regards
    Ram Pedarla

  • Release procedure problem and error

    Dear Friends ,
    I facing some major problems in release procedure , i had configured one release procedure in 4levels , due to some reason i had deleted 3release groups and codes due to it was not working . But after deleteing  in purchase order it showing all release level and only firest level is working unable to make MIGO and other release levels are not working  . The relese code which i had created is appearing in RFQ/CONTRACT etc automatically . I had not created for this any release level . It's very very different case ....till date never faced and heared . How to resolve this probelm . Due to what reasons this kind of problems occurs .
    RB

    Hi,
    Try  to delete all the release procedure available in the system.
    First  try to do the documents coorectly and configure.
    You might have done mistake in assigning the charcteristics to the class
    Please try create a NEw release procedure once again.
    Don't worry about the procedure in the RFQetc...
    G.Ganesh Kumar

  • Stored Procedure Problem

    Hello,
    I have a stored procedure that I thought worked. but I am getting an error. Basically, what it does is accept some search terms and then based on whether a value has been passed (-1 is a non value for numbers and 'null' is a non value for varchar2 fields) it returns the matching rows.
    Here is the code for the stored procedure.
    CREATE OR REPLACE  PROCEDURE "SYSADM"."SP_SEARCH_BCRS"
    (  bcr_id_in in number,
        bcr_number_in in varchar2,
        agency_id_in in number,
        lead_analyst_id_in in number,
        programmer_analyst_id_in in number,
        functional_analyst_id_in in number,
        status_id_in in number,
        status_modifier_id_in in number,
        issue_numbers_in in varchar2,
        date_reported_in in varchar2,
        short_description_in in varchar2,
        order_by_in in varchar2,
        cursor_out out types.cursorType )
    AS
          mySQL varchar2(255);
          issue_numbers_and_clause varchar(1000);
          short_desc_and_clause varchar(1000);
    BEGIN
      mySQL := 'select ID, SHORT_DESC, AGENCY_ID, TO_CHAR(DATE_REPORTED, ''MM/DD/YYYY'') "DATE_REPORTED", BCR_NUMBER from bcrs where 1=1';
      IF (bcr_id_in > 0) THEN
        mySQL := mySQL || ' and id = ' || bcr_id_in;
      END IF;
      IF (bcr_number_in != 'null') THEN
        mySQL := mySQL || ' and bcr_number like ''' || UPPER(bcr_number_in) || '''';
      END IF;
      IF (agency_id_in > 0) THEN
        mySQL := mySQL || ' and agency_id = ' || agency_id_in;
      END IF;
      IF (lead_analyst_id_in > 0) THEN
        mySQL := mySQL || ' and lead_analyst_id = ' || lead_analyst_id_in;
      END IF;
      IF (programmer_analyst_id_in > 0) THEN
        mySQL := mySQL || ' and programmer_analyst_id = ' || programmer_analyst_id_in;
      END IF;
      IF (functional_analyst_id_in > 0) THEN
        mySQL := mySQL || ' and functional_analyst_id = ' || functional_analyst_id_in;
      END IF;
      IF (status_id_in > 0) THEN
        mySQL := mySQL || ' and status_id = ' || status_id_in;
      END IF;
      IF (status_modifier_id_in > 0) THEN
        mySQL := mySQL || ' and status_modifier_id = ' || status_modifier_id_in;
      END IF;
      IF (issue_numbers_in != 'null') THEN
        SP_BUILD_TEXT_SEARCH(issue_numbers_in, 'issue_numbers', issue_numbers_and_clause);
        mySQL := mySQL || issue_numbers_and_clause;
      END IF;
      IF (date_reported_in != 'null') THEN
        mySQL := mySQL || ' and date_reported > to_date(''' || date_reported_in || ''', ''MM/DD/YYYY'')-7 and date_reported < to_date(''' || date_reported_in || ''', ''MM/DD/YYYY'')+7 and 1=1 ';
      END IF;
      IF (short_description_in != 'null') THEN
        SP_BUILD_TEXT_SEARCH(short_description_in, 'short_desc', short_desc_and_clause);
        mySQL := mySQL || short_desc_and_clause;
      END IF;
      -- add the order by clause
      mySQL := mySQL || ' order by ' || order_by_in;
      open cursor_out for mySQL;
    END;When I call it like this:
    variable people_out refCursor;
    set serveroutput on
    set autoprint on
    execute sp_search_bcrs(-1, 'null', -1, -1, -1, -1, -1, -1, 'null', 'null', 'null', 'date_reported', :people_out);I get this...
    PL/SQL procedure successfully completed.
            ID SHORT_DESC                                                                                                                                              AGENCY_ID DATE_REPOR BCR_NUMBER
            31 Use this BCR for Testing                                                                                                                                       13 02/12/2004 STW-0034
            32 adf adsf d as dfsd f                                                                                                                                           13 02/16/2004 STW-0035
            33 This is my new BCR                                                                                                                                             12 02/18/2004 HHS-0021
            34 J.P.'s New BCR                                                                                                                                                 13 02/20/2004 STW-0036
    4 rows selected.But when I call it like this...
    variable people_out refCursor;
    set serveroutput on
    set autoprint on
    execute sp_search_bcrs(-1, 'null', -1, -1, -1, -1, -1, -1, 'null', '02/03/2004', 'null', 'date_reported', :people_out);I get this.
    BEGIN sp_search_bcrs(-1, 'null', -1, -1, -1, -1, -1, -1, 'null', '02/03/2004', 'null', 'date_reported', :people_out); END;
    ERROR at line 1:
    ORA-06502: PL/SQL: numeric or value error
    ORA-06512: at "SYSADM.SP_SEARCH_BCRS", line 70
    ORA-06512: at line 1
    ERROR:
    ORA-24338: statement handle not executed
    SP2-0625: Error printing variable "people_out"Note that the only difference is that I am passing a date in the second call for the "date_reported" parameter.
    What I have already tried:
    -- commenting out the statement that appends the order by clause....the sp runs fine.
    -- commenting out the statement that appends the date_reported clause...the sp runs fine.
    I am pretty sure it is a problem with the line that has the date compare for the 'date_reported' but neither my DBA or I can find it.
    I would much appreciate any eyes looking at this.
    Thanks.
    James.

    I must admit, why pass 4-char 'null' instead of just null?
    procedure my_proc (p1 varchar2) is
    begin
    if p1 is not null then -- not if p1 != 'null'
    do something
    end if;
    end;
    execute my_proc (null) not my_proc ('null')
    Also, your params that are meant to be dates, I might just declare them as type date (Oracle will convert) or use a temp date var and to_date(p_date) into it, then add -7 or +7 to the temp date var and to_char that on your output.
    Your proc requires 13 params, 12 IN and 1 OUT (I never use keyword IN if in only). I would put the OUT param first, followed by all 'required' IN parameters, lastly the remaining optional parameters (if any). This may not apply to your example but you can specify a default value for any optional parameters at the end.
    procedure my_proc (p1 varchar2,
    p2 varchar2,
    p3 varchar2 default 'X',
    p4 varchar2 default null);
    execute my_proc ('a','b','c','d')
    execute my_proc ('a','b','c')
    execute my_proc ('a','b')
    Some people prefer overloading.

  • Urgent !! Stored Procedure Problem.

    i have created a Procedure in Oracle which when executed on SQL Prompt returns more than a number of rows.This is the exact result i want. But when i call the procedure in a JSP page by using a Callable statement,then:
    1) if i execute it by a callable statement then it returns me only one row.
    OR
    2)if i execute it by ResultSet then it gives the exception that" ResultSet is not produced"
    The procedure i have created is as follows:
    create or replace procedure show_proc(a in number,b out number,c out varchar2)
    is
    CURSOR C1 IS select col1,col2 into b,c from table_name where col3=a;
    begin
    OPEN C1;
    LOOP
    FETCH C1 INTO b,c;
    EXIT WHEN C1%NOTFOUND;
    END LOOP;
    end;
    Can anybody tell me where am i going wrong and give me the solution to my problem
    thanx
    geeta.

    Have never used them as the number of rows usually was enough for me by you could try registering output parameters with the method :
    public void registerOutParameter(int parameterIndex, int sqlType) throws SQLExceptionand I believe you can use getObject method to retrieve
    Hope this helps.

  • JTA (EJB-- Store Procedure) Problem

    I'm currently facing a problem that I'm not sure how to fix it.
              I have a Controller class that is accessing many EJB (Session Stateless Container Managed) that are a kind of Store Procedures' Wrappers.
              The Controller initializes the transaction using the UserTransaction and it commits or rollback as needed, also de EJBs at some points use the setRollbackOnly() and also inside the store procedures are some explicit commits.
              What should I expect in the following scenario:
              UserTransaction ut=null;
              try {
              ut = getUserTransaction();
              ut.begin();
              ejb1.update(); //Calls a store procedure that in the pl/sql calls commit
              ejb2.delete(); //Inside the Ejb some component throws an exception and is catched by the Ejb, then it calls setRollbackOnly() and throws a new Exception
              ut.commit();//This is not called because the previous exception
              } catch(Exception e){
              ut.rollback();//Rollback is called
              1) Is the modified data inside ejb1.update saved?
              2) Is this all wrong?
              3) What could it be a right approach to refactor this?
              Thanks,
              Johann

    johann renck wrote:
              > There is one store proc who cares about logging that is called by many others sp that
              > is the one who does commit and also is wrapped by an Ejb so it is also called inside
              > the application. Have this sp its own transaction context so when it does commit it
              > just commits the logging?
              >
              > Thanks,
              > Johann
              Yes, always. Any procedure that calls begin tran, commit, rollback, or any other call that
              changes the transactional behavior of the session, must be isolated from everything that
              WebLogic thinks is part of a transaction. Otherwise you're just going to jeopardize the
              integrity of your WebLogic-defined transactions. Ideally, you want all your transactions
              defined and controlled at one level. From the EJB/WebLogic point of view it would be much
              safer and superior to never call any procedure that had such stuff, and then do logging
              as it's own WLS EBJ tx, called everywhere needed, from within but separate from larger EJB
              transactions. Even if a logging EJB did nothing besides writing one log row, the procedure
              shouldn't call commit. The EJB system will do that.
              Note well: Anything that calls that logging procedure with the commit, commits it's
              current possibly partial transaction to that point. The DBMS connection only has one
              transaction going on at a time, and a commit permanently locks in everything changed since
              the last commit. It is not good architecture to have commits in any utility procedure.
              At the very least, if your procedures want a transaction, they should start and end
              in one procedure, eg:
              BEGIN
                   declare boolean variable in_tx
              set in_tx true if @@trancount > 0
                   if (not in_tx) BEGIN TRAN -- Otherwise, just become part of current tx
                   ... do work... this is only needed for multi-update work
              if (not in_tx) COMMIT TRAN
              END
              If the procedure only does one update/insert/delete *you don't need any
              tx control*! eg:
              BEGIN
                   insert into mylogtable values (.....)
              END
              That one insert will be part of any ongoing tx if extant, or
              will be it's own one auto-commit tx.
              If you have a procedure that must be it's own tx, then you must
              do:
              BEGIN
                   if (@@trancount > 0) raiserror("Can't call this procedure from an ongoing transaction. It must be able to commit immediately")
              END

  • Creating pl/sql procedure problems

    Dear all,
    I have problems with creating a procedure which select returns more then one row.
    CREATE OR REPLACE PROCEDURE ECM_DATA.check_padrones_datos
    IS
      v_padron_check   VARCHAR2(50);
      v_padron_number   VARCHAR2(50);
    BEGIN
       SELECT count(pd.estado)
       INTO v_padron_check
       FROM par6.padrones_datos pd, par6.padrones p, par6.FECHAS f
         where pd.estado not in ('2000','8000')
         AND PD.ARCHIVO = P.ARCHIVO
         AND P.FECHA = F.datum_s;
        DBMS_OUTPUT.PUT_LINE('Št. neuspešnih zapisov :  ' || v_padron_check);
        SELECT distinct pd.archivo
       INTO v_padron_number
       FROM par6.padrones_datos pd, par6.padrones p, par6.FECHAS f
         where pd.estado not in ('2000','8000')
         AND PD.ARCHIVO = P.ARCHIVO
         AND P.FECHA = F.datum_s;
        DBMS_OUTPUT.PUT_LINE('Padron št. :  ' || v_padron_number);
      EXCEPTION
        WHEN NO_DATA_FOUND THEN
         v_padron_number := 'Vsi padroni so OK';
         DBMS_OUTPUT.PUT_LINE('Padron št. :  ' || v_padron_number);
    END;
    Error ->  -01422: exact fetch returns more than requested number of rows
    Select returns 2 or more rows.
    SELECT distinct pd.archivo
        FROM par6.padrones_datos pd, par6.padrones p, par6.FECHAS f
         where pd.estado not in ('2000','8000')
         AND PD.ARCHIVO = P.ARCHIVO
         AND P.FECHA = F.datum_s;
    How to write correct syntax in pl/sql. I apologize in advance for rookie questions. Any help would be appreciated.
    Regards,
    Robert

    The exact implementation depends on the use case.
    You can loop through the results
    FOR r IN (
        SELECT  DISTINCT pd.archivo
        FROM    par6.padrones_datos pd
               ,par6.padrones p
               ,par6.fechas f
        WHERE   pd.estado not in ('2000','8000')
        AND     pd.archivo = p.archivo
        AND     p.fecha = F.datum_s
    LOOP
        dbms_output.put_line('Padron št. :  ' || r.archivo);
    END LOOP;
    Or maybe you can process all results in one step, e.g. if you want to update a table based on the select.
    Regards
    Marcus

  • PR release procedure problem

    We are using SAP 4.7 EE Version.
    Regarding PR release procedure, I have created PR release procedure by using characteristics with Plant, Total value of the item, document type, creation indicator and account assignment category.
    Created class PR_RELEASE with above-mentioned characteristics. The same is used in PR release procedure.
    When I am creating PR, the release procedure not picking up for standard procurement (stock material) account assignment category.
    We have identified the problem with account assignment category u2018 u2018 (Standard) while creating PR. For other account assignment categories (K, U, X, A), it is working fine.
    Recommend any SAP note numbers if you have or known.
    Points will be rewarded.
    Thanks,
    SK
    Edited by: s k on Jun 9, 2008 2:11 PM
    Edited by: s k on Jun 9, 2008 2:12 PM

    Hi
    Blank Account assignment does not work, as you cannot create a chracteristic Value as Blank.
    You need to create a new release strategy without the account assignment category chracter.
    Or remove the account assignment Chracterisitc from the release strategy
    Thanks & Regards
    Kishore

  • **Fixed** WRT54GS V6 - Intenet drops problem/router stoped responding

    The important parts:
    Windows XP SP2
    WRT54GS V6
    Motarola Cable router.
    So after 3 days on the phone with Tech Support and 2 senior advisor's, they officialy gave up... or they say they will get back to me
    Heres the problem:
    Everything was working fine until one day one day the internet connection on my WRT54G v2 decided to stop working, after trying everything i could, and connecting directly to the modem, i concluded it must be the router, and after owning it for 3 years, went out to by a new one, WRT54GS.
    Take it home, open it up, same problems... Internet works for about 30 seconds, then drops again for good. I can restart/reset the router, again it will last for about 30 seconds then drop again. The router itself after these 30 seconds cannot be pinged or connected too.
    Tech support says to return it and get a new one, maybe it was defected....i did, now router #3 same problem, keep in mind that the network still works, just the internet dosnt. I upgraded the firmware with tech support on the phone, tried just about every troubleshooting technique they could possibly try,(Power cycle, pinging, renewing, upgrading firmware, changing ip, changing to half duplex...)you name it iv tried it and still no internet, btw, im connected via wire to the router, wireless experiance same problems with other computers.
    So im kinda hopeing someone had same problem? Any idea's will help. please god! Thank youMessage Edited by helfandeli on 01-18-200712:02 AM

    Try resetting the router to factory defaults, using the procedure below.  Hopefully this will get you access to the router so you can update your router settings.
    1)  Power down all computers, the router, and the modem, and unplug them from the wall.
    2)  Disconnect all wires from the router.
    3)  Power up the router and allow it to fully boot (1-2 minutes).
    4)  Press and hold the reset button for 30 seconds, then release it, then let the router reset and reboot (2-3 minutes).
    5)  Power down the router.
    6)  Connect one computer by wire to port 1 on the router (NOT to the internet port).
    7)  Power up the router and allow it to fully boot (1-2 minutes).
    8)  Power up the computer (if the computer has a wireless card, make sure it is off).
    9)  Try to ping the router.  To do this, click the "Start" button, click on "Run".  In the box that is labeled "Open:", enter the following:  "ping 192.168.1.1"  (no quotes).  A black box will appear.  You will see 3 or 4 lines that start either with "Reply from ... " or "Request timed out."   If you see "Reply from ...", your computer has found your router.
    10)  Open your browser and point it to 192.168.1.1.  This will take you to your router's login page.  Leave the user name blank, then in the password field, enter "admin"  (with no quotes).  This will take you to your router setup page.  Note the version number of your firmware (usually listed near upper right corner of screen).  Exit your browser.
    If you get this far without problems, try the setup disk, and see if you can get your router set up and working.  When you get to the password prompt in setup, be sure to leave the user name blank.
    If you have a problem, note the exact error message and the status of the lights on the router, and report back.
    Hope this helps.

  • Pricing Procedure problem when creating order w/Ref to billing doc

    Hello all.
    When I create a SO w/ SaType 'A' it picks the correct Pricing procedure. However if I were to create the same Order Type 'A' w/ reference to a billing doc it picks up the Pricing procedure of the billing doc and not the one assigned to it in PP determination.
    Also this works correctly when I create SO w/ref to billing doc with order type 'B'. So I am kinda stumped as to why it would not work with the order type in the above example.

    Hi Robert,
    Check the copy control configuration:
    Spro>Sales and Distribution>Sales-->Maintain Copy Control for Sales Documents
    In this, select
    Copying Control: Billing Document to Sales Document
    on the pop-up.
    In the next screen, select the appropriate source billing doc type to target Sales Order type that gives you problem.  Then in its details, select Item and then the item category that is being defaulted into your SO#, in its copy function, verify the Pricing Type.  It can be made to the same value as the one that works fine for you (the other document types config).
    regards

  • Transformation to WORD from XSLT with java stored procedure - PROBLEM

    Hi all,
    I'm building a java function for transformation of xml document through .xslt scheme to WORD. I use xalan.
    Now, everything works fine if I run the java function on the client VM
    But on the server where the classes needed for the transformation are loaded, it crashes with a strange exception
    nulljava.lang.NullPointerException
    Now I've located the problem, and it occurs in this line in the java code:
    transformer.transform( new StreamSource(xmlFile),  new StreamResult(osIzlez));
    (where xmlFile is the source for the transformation, and the transformer is configured with the proper .xslt scheme, osIzlez points to a bytearraystream of a blob in the database where the .doc file is going to be generated and loaded)
    I also found out that the NullPointerException occurs because the transformer is actually null on the server (although it's configured with the .xstl scheme and should not be null ! ), but on the client it's never null!
    What could be the problem, does anyone have an IDEA?
    Edited by: Daniel Kiprijanovski on 17.9.2009 03:07

    OK, i found out that there's a reported bug about that exception on the java VM. I found a way arround it however.
    Thanks,
    Daniel K.

  • PROCEDURE PROBLEM - Exact Fetch Returns More Than Requested Number of Rows

    Here is my procedure:
    CREATE OR REPLACE PROCEDURE question4
      ( cust_first IN customer.custfirstname%TYPE,
       cust_last IN customer.custlastname%TYPE,
       customer_no OUT customer.customerSsn%TYPE,
       cust_address OUT customer.address%TYPE,
       loanID OUT loan.loanNo%TYPE,
       application_date OUT loan.appdate%TYPE,
       remaining_payments OUT loan.remainingpaymentsdue%TYPE,
       loan_amount OUT loan.loanamount%TYPE,
       loan_term OUT loan.loanterm%TYPE,
       interest_rate OUT loan.interestrate%TYPE,
       monthly_payment OUT loan.monthlypayment%TYPE)
       AS
    BEGIN
      SELECT customerssn, address  INTO customer_no, cust_address FROM CUSTOMER WHERE custfirstname= cust_first AND custlastname = cust_last;
      SELECT loanno, remainingpaymentsdue, loanamount, loanterm, interestrate, monthlypayment, appdate INTO loanID, remaining_payments, loan_amount, loan_term, interest_rate, monthly_payment, application_date FROM LOAN WHERE customerSsn = customer_no;
      EXCEPTION
        WHEN OTHERS
        THEN
        NULL;
    END;Here is the anonymous block showing the use of my procedure.
    SET SERVEROUTPUT ON
    DECLARE
      customer_number customer.customerSsn%TYPE := NULL;
      customer_address customer.address%TYPE := NULL;
      loan_number loan.loanNo%TYPE := NULL;
      app_date loan.appdate%TYPE := NULL;
      rem_payment loan.remainingpaymentsdue%TYPE := NULL;
      l_amount loan.loanamount%TYPE := NULL;
      l_term loan.loanterm%TYPE := NULL;
      i_rate loan.interestrate%TYPE := NULL;
      m_payment loan.monthlypayment%TYPE := NULL;
      view_customerSSN NUMBER;
      view_address VARCHAR2(50);
      view_loanID NUMBER;
      view_date DATE;
      view_remaining_payment NUMBER;
      view_loan_amount NUMBER(8,2);
      view_loan_term VARCHAR2(10);
      view_interest_rate FLOAT(20);
      view_monthly_payment NUMBER(8,2);
    BEGIN
      question4 ('Tim', 'Thompson',  customer_number, customer_address, loan_number, app_date, rem_payment, l_amount, l_term, i_rate, m_payment);
      IF (customer_number IS NULL OR customer_address IS NULL OR loan_number IS NULL OR app_date IS NULL
      OR rem_payment IS NULL OR l_amount IS NULL OR l_term IS NULL OR i_rate IS NULL OR m_payment IS NULL) THEN
         DBMS_OUTPUT.PUT_LINE ('NULL VALUE');
      ELSE
        view_customerSSN := customer_number;
        view_address := customer_address;
        view_loanID := loan_number;
        view_date := app_date;
        view_remaining_payment := rem_payment;
        view_loan_amount := l_amount;
        view_loan_term := l_term;
        view_interest_rate := i_rate;
        view_monthly_payment := m_payment;
        DBMS_OUTPUT.PUT_LINE ('CUSTOMER NO : ' ||  view_customerSSN);
        DBMS_OUTPUT.PUT_LINE ('CUSTOMER ADDRESS : ' ||  view_address);
        DBMS_OUTPUT.PUT_LINE ('LOAN NO : ' ||  view_loanID);
        DBMS_OUTPUT.PUT_LINE ('LOAN APPLICATION DATE : ' ||  view_date);
        DBMS_OUTPUT.PUT_LINE ('REMAINING PAYMENTS : ' ||  view_remaining_payment);
        DBMS_OUTPUT.PUT_LINE ('LOAN AMOUNT : ' ||  view_loan_amount);
        DBMS_OUTPUT.PUT_LINE ('LOAN TERM : ' ||  view_loan_term);
        DBMS_OUTPUT.PUT_LINE ('INTEREST RATE : ' ||  view_interest_rate);
        DBMS_OUTPUT.PUT_LINE ('MONTHLY PAYMENT : ' ||  view_monthly_payment);
      END IF;
    END;
    /Error Message:
    Error report:
    ORA-06550: line 21, column 3:
    PLS-00306: wrong number or types of arguments in call to 'QUESTION4'
    ORA-06550: line 21, column 3:
    PL/SQL: Statement ignored
    *06550. 00000 - "line %s, column %s:\n%s"*
    **Cause: Usually a PL/SQL compilation error.*
    **Action:*
    What is the problem here? Could you anyone help me?
    Thanks for your help from now on.
    Have a beautiful day...
    Edited by: RobertPires on May 1, 2011 5:13 PM
    Edited by: RobertPires on May 1, 2011 8:19 PM

    Thanks for your help, Sir. As you see it as above, I fixed the order of parameters, but since I would like to display multiple records, my procedure did not work properly and I got this error message:
    Error report:
    ORA-01422: exact fetch returns more than requested number of rows
    ORA-06512: at "S4048958.QUESTION4", line 20
    ORA-06512: at line 21
    *01422. 00000 - "exact fetch returns more than requested number of rows"*
    **Cause: The number specified in exact fetch is less than the rows returned.*
    **Action: Rewrite the query or change number of rows requested*
    I guess I need to create a cursor in my procedure, but I dunno how. Could you give me some suggestion for this please?
    Thanks again...

  • To connect a datablock to a query - stored procedure: problem

    I have the following table...
    CREATE TABLE I_TIPOLOGIA (
    CODICE NUMBER(6),
    DESCRIZIONE VARCHAR2(100),
    CONSTRAINT I_TIPOLOGIA_PK PRIMARY KEY (CODICE) );
    and the following package to connect a datablock to
    previous table with a stored procedure...
    CREATE or REPLACE PACKAGE DATABANKER_TIPOLOGIE AS
    TYPE TipTableOfRec IS TABLE OF I_TIPOLOGIA%ROWTYPE;
    PROCEDURE leggi(resultset IN OUT TipTableOfRec);
    END DATABANKER_TIPOLOGIE;
    CREATE or REPLACE PACKAGE BODY DATABANKER_TIPOLOGIE AS
    PROCEDURE leggi(resultset IN OUT TipTableOfRec) AS
    BEGIN
    SELECT * BULK COLLECT INTO resultset
    FROM I_TIPOLOGIA;
    END leggi;
    END DATABANKER_TIPOLOGIE;
    When I compile the form I receive in QUERY-PROCEDURE trigger
    en error 306: "number or type of arguments are wrong in POPULATE_BLOCK"
    I post the trigger auto generated by Forms Builder 6i...
    DECLARE
    bk_data DATABANKER_TIPOLOGIE.TIPTABLEOFREC;
    BEGIN
    DATABANKER_TIPOLOGIE.leggi3(bk_data);
    PLSQL_TABLE.POPULATE_BLOCK(bk_data, 'BLOCCO50'); -- <- error here
    END;
    How can I solve this problem? Maybe there is a bug?
    P.S. I'm using Oracle Database 9i

    CREATE or REPLACE PACKAGE DATABANKER_TIPOLOGIE AS
    TYPE TipTableOfRec IS TABLE OF I_TIPOLOGIA%ROWTYPE;
    PROCEDURE leggi(resultset IN OUT TipTableOfRec);
    END DATABANKER_TIPOLOGIE;I have solved with this replacement 1) -> 2)
    1) TYPE TipTableOfRec IS TABLE OF I_TIPOLOGIA%ROWTYPE;
    2) TYPE TipTableOfRec IS TABLE OF I_TIPOLOGIA%ROWTYPE
    INDEX BY BINARY_INTEGER;
    with 2) now works.
    Now I have stored-procedures for query, insert, delete
    and update.
    I have some problems with delete and update of the records
    because it seems that they are locked.
    I think that it is due to the absence of lock
    stored-procedure... there's someone that can help me with
    the lock SP implementation?

Maybe you are looking for

  • Re: Satellite L - How to connect my digital video cam?

    I have a Canon digital video camera (bought in 2004). I have been using it to transfer movies onto my other Toshiba laptop, but there is no place to plug in on my new laptop. I did use a iEEE1394 but it doesn't work on this one. What alternative is t

  • Oracle 11g for WinXP VirtualMachine install problem

    Hi! I have problem with installation Oracle 11g x32 on WinXP x32 which was installed into VMWare Player When my installation goes to 60% i have an error em.ear file not found... I looking for many issues on this forum, but i can't fix this error (i h

  • Scoring one of three button clicks on a single screen - can it be done

    I have captured an Assessment simulation (in Captivate 5). On one screen there are three legitimate places a person can click to move to the next screen - any of them would be correct. At the moment, each is being tracked for a point on the Quiz, but

  • Event name not appearing in calendar

    We currently have Novell Groupwise 8 as our email system and we are syncing with the iPad by using the Microsoft Exchange, when creating a new event, the event name does not appear on the calendar?? Event names for previously created events are showi

  • Duplicate entries in calendar

    I have an entry in my calendar on iPhone for Sunday 13 April marked as Easter Monday. Of course Easter Monday is not until mon 21 Aoril. I don't have any way of deleting the entry. There are also five duplicate entries on my iPad, same as above. They