Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.server -> Re: Another ProC mystery...
If this is 8.1.5 on Linux, there is a bug in Pro*C using multiple source files. I don't know if it got fixed, as we gave up on it (Oracle/Linux) a while back.
-Peter
Steve Blomeley wrote:
>
> Hi,
>
> I had a program that worked OK... something like:
>
> EXEC SQL FETCH my_cursor INTO :bindvar;
> while( 0 == sqlca.sqlcode ) {
> if( bindvar == what_I_am_looking_for )
> INSERT INTO a_table VALUES( :bindvar );
> EXEC SQL FETCH my_cursor INTO :bindvar;
> }
>
> This worked fine ... I decided to move the INSERT operation into a
> seperat function:
>
> EXEC SQL FETCH my_cursor INTO :bindvar;
> while( 0 == sqlca.sqlcode ) {
> my_insert_function( bindvar );
> EXEC SQL FETCH my_cursor INTO :bindvar;
> }
>
> This worked fine too ... so I decided to move the definition of the
> "insert"
> function into a seperate source file. Now this links OK, but when I run
> the
> program I get an error on the INSERT statement:
>
> Oracle error: -1036
> Message: ORA-01036: illegal variable name/number
>
> This suggests a problem with the bind variable in the INSERT statement,
> so I changed
> this statement to just insert a constant string (ie: 'sometext'), but
> now things are
> weirder still - Every time the INSERT statement is reached, it seems the
> SELECT cursor
> is reset, so the thing just loops forever, fetching the first few rows
> from the cursor,
> attempting 1 insert, then back to fetching the first few rows ... and so
> on.
>
> Hmmm,
> Any ideas?
>
> Thanks
> SB
Received on Tue Jun 27 2000 - 00:00:00 CDT
![]() |
![]() |