cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "John F. Walsh" <>
Subject Prepared statements with the SQL transformer
Date Wed, 04 Oct 2006 14:33:11 GMT

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?

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:
For additional commands, e-mail:

View raw message