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 -> ProC/C++ question

ProC/C++ question

From: Last- und Energiemanagement <lem_at_uumail.de>
Date: 28 Apr 1999 12:25:05 GMT
Message-ID: <3726FE13.E232E81C@uumail.de>


It is possible to do this:

    EXEC SQL BEGIN DECLARE SECTION;

      int p1;
      sql_cursor s;

    EXEC SQL END DECLARE SECTION;
    EXEC SQL FETCH :s INTO :p;

but it is not possible to do this:

    EXEC SQL BEGIN DECLARE SECTION;

      char szStatement[255];
      sql_cursor s;

    EXEC SQL END DECLARE SECTION;
    strcpy(szStatement, "SELECT * ....);

    EXEC SQL PREPARE SM FROM :szStatement;

    EXEC SQL DECLARE :s CURSOR for SM;

    EXEC SQL OPEN :s;

In other words, I can fetch from a cursor that is a variable, but I can neither declare nor open it. The problem is, that I have to manage different cursors at the same time. Is there a way to do this?

Thanks Received on Wed Apr 28 1999 - 07:25:05 CDT

Original text of this message

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