Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.misc -> Pro*C Prepare Problem

Pro*C Prepare Problem

From: Jennifer <jblankenship_at_osc.uscg.mil>
Date: 5 Dec 2001 13:29:44 -0800
Message-ID: <bd4da684.0112051329.1451acd7@posting.google.com>


We are in the middle of a Software Upgrade. We are moving from HPUX 10.20 to HPUX 11 (64 bit) and from Oracle 7.3.4 to Oracle 8.1.6 (64 bit). We are recompiling all the legacy code. I am having trouble with one of the executables. It is a text based menu that returns information to the user by issuing Select statements to the database. The first time through the menu, the information is returned fine. However, if you choose the menu selection again, you get a 'No Data Found' error.

The code utilizes Pro*C cursors. In a loop, we create the Select statement and then Prepare the statmenet, Declare the cursor, Open the cursor, Fetch into it, & Close the cursor. The next pass through the loop, it dies on the Prepare statment with a 'No Data Found' error. I put in debug statments, and the Select statements are identical on both passes.

What am I doing wrong? Any help would be greatly appreciated!

Thanks in advance,
Jennifer
jblankenship(at)osc(dot)uscg(dot)mil

Here is the code snippet:



  EXEC SQL PREPARE PARSERSELECTOR FROM :parserselect;   if (sqlca.sqlcode != 0)
{
      SetSQLError(&sqlca, "InitializeParserRetrieval");
      return(-1);

    }

  EXEC SQL DECLARE PARSERRETRIEVAL CURSOR FOR PARSERSELECTOR;   if (sqlca.sqlcode != 0)
{

      SetSQLError(&sqlca, "InitializeParserRetrieval");
      return(-1);

    }

  EXEC SQL OPEN PARSERRETRIEVAL;
  if (sqlca.sqlcode != 0)
{

      SetSQLError(&sqlca, "InitializeParserRetrieval");
      return(-1);

    }
#else
  machine_count = 0;
#endif
  return(NO_ERROR);
}
Received on Wed Dec 05 2001 - 15:29:44 CST

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US