Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.misc -> ProC SQL Question Regarding Cursors
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