开发者

Calling a Stored Procedure dynamically using Groovy SQL

开发者 https://www.devze.com 2023-01-17 15:58 出处:网络
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:

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

0

精彩评论

暂无评论...
验证码 换一张
取 消