Calling a Stored Procedure dynamically using Groovy SQL
I've a grails application service where I'm trying to call a stored procedure dynamically.
Here is a sample snipper of what I'm trying to do:
myService.callProcedure (procedureName, inputParams)
My stored procedure takes input and out params. How I can call a procedure on the fly without registering output parameters and then get all the output parameters as a ResultSet or something.
e.g:
def results = sql.firstRow("call $proce开发者_StackOverflowdureName(?, ?, ?, ? .....)", inputParams)
where I would expect 'results' to have all out parameters returned by the procedure.
Is it possible?
Thanks, Alam Sher
http://groovy.codehaus.org/Database+features
Scroll Down to the Stored Procedure Support
精彩评论