tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Turner, John" <>
Subject RE: OFF-TOPIC: Pointers to CallableStatement docs?
Date Tue, 20 Aug 2002 12:09:42 GMT

The 11th is the return_status.  Actually, #1 is the return status.
According to the CallableStatement docs, you have to account for every "?"
in your statement.  There is 1 return status, 5 input parameters, and 5
output parameters: 1 + 5 + 5 = 11.

cstmt = sConn.prepareCall("{? = call

John Turner

-----Original Message-----
From: Peter Lin []
Sent: Tuesday, August 20, 2002 8:07 AM
To: Tomcat Users List
Subject: RE: OFF-TOPIC: Pointers to CallableStatement docs?

correct me if I'm wrong, but I count only 10
parameters. in one line you have
cstmt.registerOutParameter(11, Types.VARCHAR);

where is the 11th parameter?

peter lin

--- "Turner, John" <> wrote:
> Thanks, but I'm not getting any Java-related error
> messages.  The Java code
> just blows right on through, as everything keys off
> of the return status,
> which is always "false" or "negative".  This is
> because the stored procedure
> never executes, and according to the debug log
> printed by the driver, it's
> parameter related...that is, whatever I am doing
> with set*() and
> registerOutParameter() doesn't match up with what
> the procedure is
> expecting.
> That's my question...can anyone point me to a
> resource that shows how to
> call real-world stored procedures correctly with
> CallableStatement?  By
> "real-world" I don't mean rudimentary "take two
> numbers and add them
> together" or "get a row from a table" procedures, I
> can already do that.
> I'm looking for a more advanced tutorial, something
> that shows how to have
> inputs, outputs, in/outputs, and a return status,
> all at once.  It must be
> possible, I just can't figure it out, and can't find
> any resources that
> explain how to do it.  We have VB DLLs calling these
> procedures in
> production, so I know the procedures work, at least
> in conjunction with VB.
> John Turner

To unsubscribe, e-mail:   <>
For additional commands, e-mail: <>

View raw message