Jump to content

using CallableStatement when needed


Recommended Posts

By: Lutz Mueller - lutz_mueller

using CallableStatement when needed

2006-03-16 04:14

Hello,

 

We are using Jasperreports since version 0.4. it is a great product and serves

our reporting needs quite well.

However , recently we switched our main product to use DB2 as a database

backend. i had to call a stored proc inside a report. This did not work

because the JRJdbcQueryExecuter always uses

connection.prepareStatement(String), and the db2 jdbc driver insists on

stored procedures being called by a CallableStatement. So i patched the

JRJdbcQueryExceuter to use connection.prepareCall(String) when appropriate (i

just use contains("call") on the query string, to determine if its an

procedure call).

Now my questions are: is there a way to force jasper to use a

callableStatement without patching the sourcecode? and, if not, could this

patch please be applied to the jasperreports source-tree, so i do not have to

"customize" every new version for my needs?

 

lutz mueller

Link to comment
Share on other sites

  • Replies 0
  • Created
  • Last Reply

Top Posters In This Topic

Popular Days

Top Posters In This Topic

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×
×
  • Create New...