Hi all,
When I try to connect to an oracle database and run a stored procedure where one of the parameter is a REF Cursor, I am getting the error java.sql.SQLException: Invalid column type: 2012.
I am using the keywords.
Here is the code output.
@Keyword
def GetResultSet(String spName) {
ResultSet rs = null;
CallableStatement cs = null;
cs = connection.prepareCall(“{call PKG_TESTING.SP_GETMENULIST(?,?)}”);
cs.setString(“P_USERID”, “User Admin”);
cs.registerOutParameter(“P_RESULTS”, Types.REF_CURSOR);
cs.execute();
rs = cs.getResultSet();
while (rs.next()) {
System.out.println("URL: " + rs.getObject(1));
}
return rs
}
Upon running the code, I am getting the error “org.codehaus.groovy.runtime.InvokerInvocationException: java.sql.SQLException: Invalid column type: 2012”
Any advice will be helpful.
Thanks
Sai