I am trying to execute some stored procedures in groovy way. I am able to do it quite easily by using straight JDBC but this does not seem in the spirit of Grails.
I am trying to call the stored procedure as-
sql.query( "{call web_GetCityStateByZip(?,?,?,?,?)}",[params.postalcode, sql.out(java.sql.Types.VARCHAR), sql.out(java.sql.Types.VARCHAR), sql.out(java.sql.Types.INTEGER), sql.out(java.sql.Types.VARCHAR)]) { rs -> params.city = rs.getString(2) params.state = rs.getString(3) }
i tried various ways like sql.call . I was trying to get output variable value after this .
Everytime error-
Message: Cannot register out parameter. Caused by: java.sql.SQLException: Cannot register out parameter. Class: SessionExpirationFilter
but this does not seem to work.
Can anyone point me in the right direction.
Thanks Sadhna