tags:

views:

14

answers:

1

I have an org.springframework.jdbc.object.StoredProcedure which I am using to call a DB function. I want to be able to see the generated SQL. I am calling

org.springframework.jdbc.object.SqlCall.getCallString()

on my StoredProcedure object but this returns a String with ? characters in place of the parameters. How can I get the complete SQL with the parameters included?

+1  A: 

You can't, that's not how stored procedures work. The application sends the arguments separately from the call string.

What you can do, however, is turn your logging up to DEBUG, you should see Spring logging the individual arguments as it sets them.

skaffman