Parameterized Passthru statement not fetching results

Hi Experts. I need some inputs for finding the issue.
We are using IIBv10 on AIX server.
I’m trying to access an Oracle12C database by simple query with two inputs keys.
SET OutputRoot.XMLNSC.EffDate.data[] =
PASSTHRU(‘SELECT effdate FROM TABLE WHERE Key1 = ? AND Key2 = ?’ TO
Database.{DSN} VALUES (key1 , key2));

This is not giving me any result though we have data in table and also usertrace shows me correct final constructed SQL query with proper substitution of DSN and key input parameters.
Apart form this, it is giving me Oracle error : ‘max limit of curosrs exceeded’

If i hardcode the above query as shown below, i’m getting the result.
SET query = ‘SELECT effdate FROM TABLE WHERE Key1 = ||key1||’ AND Key2 = ||key2”; — ignore syntax issues 🙂

SET OutputRoot.XMLNSC.EffDate.data[] = PASSTHRU(query TO Database.{DSN} );

I ran Usertrace and didnt give me any clue as usertrace looks as expected without any errors.

I’m able to access other Databases without any issues and above code working like a charm.
Please kindly help.

Related:

Leave a Reply