Nic Ferrier wrote:
> So I'm simply transforming querys from:
>
>
> SELECT x FROM y WHERE z;
>
>
> into
>
> DECLARE jdbcXX CURSOR FOR $query ;
> FETCH FORWARD $fetchSize jdbcXX;
>
And when $query is: "insert into foo values (...); select * from bar;"
You will get:
DECLARE jdbcXX CURSOR FOR insert into foo values (...);
select * from bar;
FETCH FORWARD $fetchSize jdbcXX;
Which clearly isn't what you want.
So like the discussion that we had on when we should/could use server
side prepared statements either the default needs to be not to use
cursors, or the sql string needs to be parsed looking for ';' and only
use cursors if no ';' is found.
thanks,
--Barry