仅仅是测试用的。 如果是这样: CREATE PROCEDURE [dbo].[testP] AS delete from systemdepartmentInfo where sdinPArentID=11222 select * from systemdepartmentInfo .....中间一些处理,最后需要返回后面这句 select * from systemuserinfo怎么办?
用cst.execute()方法 Moves to this Statement object's next result, returns true if it is a ResultSet object, and implicitly closes any current ResultSet object(s) obtained with the method getResultSet. There are no more results when the following is true: // stmt is a Statement object ((stmt.getMoreResults() == false) && (stmt.getUpdateCount() == -1))
to chn217(天涯) : 我也试过,但一设CallableStatement cst = conn.prepareCall(sql, ResultSet.TYPE_SCROLL_SENSITIVE, ResultSet.CONCUR_READ_ONLY);时,cst.execute返回值总为false,cst.getResultSet就总为null了。
如果是这样:
CREATE PROCEDURE [dbo].[testP] AS
delete from systemdepartmentInfo where sdinPArentID=11222
select * from systemdepartmentInfo
.....中间一些处理,最后需要返回后面这句
select * from systemuserinfo怎么办?
Moves to this Statement object's next result, returns true if it is a ResultSet object, and implicitly closes any current ResultSet object(s) obtained with the method getResultSet.
There are no more results when the following is true: // stmt is a Statement object
((stmt.getMoreResults() == false) && (stmt.getUpdateCount() == -1))
我也试过,但一设CallableStatement cst = conn.prepareCall(sql, ResultSet.TYPE_SCROLL_SENSITIVE, ResultSet.CONCUR_READ_ONLY);时,cst.execute返回值总为false,cst.getResultSet就总为null了。