Results 1 to 2 of 2
  1. #1
    Join Date
    Dec 2003

    Unanswered: What cold cause a fetch to fail?

    For a cursor structured like

       vacol_row               va_status_history%ROWTYPE;
       CURSOR vacol_csr
          SELECT *
            FROM wctax.va_status_history;
        OPEN vacol_csr;
            FETCH vacol_csr
            INTO vacol_row;
        END LOOP;
    We are converting code from COBOL to Oracle, and there are many custom error messages built around FETCHes, as they seemed to be a common failing point on the WANG. I'm trying to train WANG Analysts to trust the Oracle error handling mechanism, allowing Oracle to raise the error it generates from a failed fetch back out to the calling program - rather than custom coding an exception. I don't know how to get the above FETCH to fail so that I can show them the error message, though.

    I guess I'm getting concerned that Analysts are going to start hunting down problem areas, based on WANG experience, to place anonymous blocks all over their packages so that they can capture possible error scenarios.

    Has anyone been in this position before? Advice? Oh, and a method for forcing a cursor FETCH to fail?


  2. #2
    Join Date
    Jul 2003
    how about changing the rowtype to something it isn't?
    this way the rowtypes don't match.
    PHP Code:
    vacol_row               va_history%ROWTYPE
    - The_Duck
    you can lead someone to something but they will never learn anything ...

Posting Permissions

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