Sybase procedure output parameter

SYBASE ISSUSES

sybase output parameter:
declare @msg varchar(1024)
set @msg = 'dsaf'
exec CMUserSearch_jason 'xs05319', 'LS', @msg output
select @msg

if you want to get output param in JDBC, you can
cstmt.getString(3), but be careful, this should use after you haved used the rs already

prepraredStatement.execute()
  A set sql or select @param = 'dsaf' will treated as a null resultSet
System.out.println(cstmt.getMoreResults()); // fasle if the first result is null or is a update sql
rs = cstmt.getResultSet();
System.out.println(rs); //null

so you must be careful when use this method, i recommend u use the executeQuery() instead

你可能感兴趣的:(Sybase,output)