Skip to Content.
Sympa Menu

freetds - Re: Output parameters problems

freetds AT lists.ibiblio.org

Subject: FreeTDS Development Group

List archive

Chronological Thread  
  • From: Bob Kline <bkline AT rksystems.com>
  • To: TDS Development Group <freetds AT franklin.oit.unc.edu>
  • Subject: Re: Output parameters problems
  • Date: Wed, 28 Jun 2000 12:27:03 -0400


Edson Carlos Ericksson Richter wrote:

> Can anyone send me a sample using a CallableStatement, using a prepareCall(
> String ).
>
> I'm using this to call a StoredProcedure, but the statement fails when I
> call execute (always returns false), and output parameters are not modified.
>
> My code is:
>
> ...
> String proceed = new String( "N" );
> cl = cn.prepareCall( "PR_Login ?, ?, ? OUT " );
> cl.setString( 1, username );
> cl.setString( 2, password );
> cl.setString( 3, proceed );
>
> boolean result = cl.execute( );
> ...
>
> The variable proceed have their value not modified to S
> My stored Procedure was created with the following script:
>
> create procedure PR_Login (@username varchar(15), @password varchar(15),
> @proceed char(1) output)
> AS
>
> select @proceed = 'S'
>
> Thanks for anyone that can help-me.
>

You don't have the required registerOutParameter() call in your code.
Unfortunately,
even after you add it this won't work because registerOutParameter isn't
implemented
yet.

Bob






Archive powered by MHonArc 2.6.24.

Top of Page