存储过程
CREATE PROCEDURE proc
@p_cursor CURSOR VARYING OUTPUT
AS
SET @p_cursor = CURSOR FOR select * from tableA
GO JAVA代码
try {
CallableStatement cs = conn.prepareCall("{? = call proc()}");
cs.registerOutParameter(1, Types.OTHER); 《==此处报错
cs.execute();
ResultSet rs = cs.getObject(1);
System.out.println(rs.next());
} catch (SQLException e) {
e.printStackTrace();
}
异常信息
[Microsoft][SQLServer 2000 Driver for JDBC]The specified SQL type is not supported by this driver.搞郁闷了
CREATE PROCEDURE proc
@p_cursor CURSOR VARYING OUTPUT
AS
SET @p_cursor = CURSOR FOR select * from tableA
GO JAVA代码
try {
CallableStatement cs = conn.prepareCall("{? = call proc()}");
cs.registerOutParameter(1, Types.OTHER); 《==此处报错
cs.execute();
ResultSet rs = cs.getObject(1);
System.out.println(rs.next());
} catch (SQLException e) {
e.printStackTrace();
}
异常信息
[Microsoft][SQLServer 2000 Driver for JDBC]The specified SQL type is not supported by this driver.搞郁闷了
解决方案 »
免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货