欢迎您访问程序员文章站本站旨在为大家提供分享程序员计算机编程知识!
您现在的位置是: 首页

Sybase procedure output parameter

程序员文章站 2022-07-02 13:33:54
...
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

相关标签: output sybase