× The internal search function is temporarily non-functional. The current search engine is no longer viable and we are researching alternatives.
As a stop gap measure, we are using Google's custom search engine service.
If you know of an easy to use, open source, search engine ... please contact support@midrange.com.



Hi Kurt,

CallableStatement is the correct input. You would not want to pass a REsultSet, since there may not be a resultset if your output is all done through parameters!

So I guess I don't understand your objection to using a CallableStatement. When you call the stored procedure, you're doing something like

TheCallableStatement = JDBC_PrepCall(conn: 'call the-procedure')

Just pass TheCallableStatement back to JDBC_getString() and friends. Also, don't forget to register your output parameters. Java is weird about that.

-SK


On 2/27/2013 5:10 PM, Anderson, Kurt wrote:
Hi,

I see how processing a result set from a stored procedure works, but I'm not clear on how to retrieve output parameters.

In the JDBCR4 presentation, I see this:
"JDBC_getString(), JDBC_getInt(), JDBC_getShort(), JDBC_getBoolean()
Get the values of output parameters passed from the stored procedure"

Looking at the JDBC_get... procedures, it appears that the first parameter is the CallableStatement. The CallableStatement is the ResultSet object when processing a result set. I'm not sure what it should be when not working with a result set.

This is the stored procedure definition I'm working with:
create procedure [dbo].[spBulkInsertCdrMaster] (@fileName varchar(200), @replaceCdrMaster int, @result varchar(500) output, @message varchar(500) output)


We do have the option to change from output parms to a result set, but I figured I'd take this moment to learn how to handle the stored procedure as it is defined.

Thanks,
Kurt Anderson
Sr. Programmer/Analyst
CustomCall Data Systems, a division of Enghouse Systems Ltd.


As an Amazon Associate we earn from qualifying purchases.

This thread ...

Follow-Ups:
Replies:

Follow On AppleNews
Return to Archive home page | Return to MIDRANGE.COM home page

This mailing list archive is Copyright 1997-2024 by midrange.com and David Gibbs as a compilation work. Use of the archive is restricted to research of a business or technical nature. Any other uses are prohibited. Full details are available on our policy page. If you have questions about this, please contact [javascript protected email address].

Operating expenses for this site are earned using the Amazon Associate program and Google Adsense.