Output parameters problems

Edson Carlos Ericksson Richter richter at viaapia.com.br
Sun Jul 2 11:17:54 EDT 2000

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)

  select @proceed = 'S'

Thanks for anyone that can help-me.

Edson Richter

More information about the FreeTDS mailing list