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 SQL Question Regarding Cursors

ProC SQL Question Regarding Cursors

From: Melissa <melissa_2114_at_yahoo.com>
Date: 12 May 2003 16:46:16 -0700
Message-ID: <ed009888.0305121546.a7935de@posting.google.com>


I need some advice - I was taught that when using cursors, I should follow this format:

EXEC SQL
   DECLARE cursor_name CURSOR FOR

    <SQL Statement inserted here>

EXEC SQL OPEN cursor_name;
EXEC SQL WHENEVER NOT FOUND DO break;

for (;;)
{
  EXEC SQL FETCH cursor_name INTO

:variable1 :nvariable1,
:char1 :nchar1,
:int1 :nint1;

}

It was my understanding for each field, you needed another place holder that was defined as a "short" (:nvariable1, :nchar1, :nint1 are defined as short values).

What bothers me is that I have seen the above fetch done without these integer values associated with the variables. Is what I learned wrong?

Thanks!

Melissa Received on Mon May 12 2003 - 18:46:16 CDT

Original text of this message

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