Greetings,

I'm using Cocoon 2.1.6. I need the SQL transformer to use Java prepared statements and do the parameter substitution after the prepared statement declaration so that the Oracle execution plan developed for one query works for the next query with different parameter values.

The sql:substitute-value substitution looked promising, but it does the substitution using string buffer manipulation before the prepared statement is created, so that doesn't solve my problem. Calling the query a stored procedure and using sql:in-parameters also looked promising, but since I don't have any out parameters, SQLTransformer.Query.serializeStoredProcedure returns without serializing the result set (because outParamaetersNames == null), so I don't get the result set.

Has anyone had any success using the SQLTransformer to run stored procedures with parameters?

Thanks,
John Walsh



Background / example:
It's important to the database guys that the query be
select customer_name from order where order_id = ?

with order_id being set after the prepared statement declaration, so that Oracle can use the same execution plan on subsequent executions of the query with different order IDs.

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to