This week's book giveaway is in the General Computing forum. We're giving away four copies of Arduino in Action and have Martin Evans, Joshua Noble, and Jordan Hochenbaum on-line! See this thread for details.
I'm having a hard time trying to invoke a stored procedure in Oracle 8.1.7 using JSP on Tomcat(Apache). Here is my code: String rvs = request.getParameter("rvs"); String zip = request.getParameter("zip_code"); String cpt = request.getParameter("cpt"); String strQuery = "{call PKG_RETURNRECORDS.RETURNRECORDS(?,?,?)}";
ResultSet rset = (ResultSet)cs.getObject(4); %> I get the following error: Internal Servlet Error: javax.servlet.ServletException: Invalid column type ...... then ...... Root cause: java.sql.SQLException: Invalid column type There must be something simple that I'm missing, but I can't figure it out. Any help would be appreciated. [This message has been edited by Brian E (edited September 07, 2001).] [This message has been edited by Brian E (edited September 07, 2001).]
Hey Brian, Just add one more question mark to the statment where ur calling actual store procedure. Ur registering 4th as a out parameter and there are only three question mark. Hope this will help u. String strQuery = "{call PKG_RETURNRECORDS.RETURNRECORDS(?,?,?,?)}";
As the previous post-ers pointed out, you need to have four parameters. But what is not clear is whether the resultset is the fourth parameter of the call (i.e., "{ call PKG_RETURNRECORDS.RETURNRECORDS(?,?,?,?) }" or whether it is a return value from the procedure (i.e., "{? = call PKG_RETURNRECORDS.RETURNRECORDS(?,?,?) }"). In the first case the you would want to set up the callable statement as you crrently have it. If it's the latter, then you want:
But in either case, if you have four parameters (in, out, in/out) you need to have four variables (question marks) in your call setup.