Try OpenEdge Now
skip to main content
SQL Reference
JDBC Reference : Java Class Reference : SQLPStatement : SQLPStatement.rowCount : Throws
 
Throws
DhSQLException

Example

This example uses the rowCount method of the SQLPStatement class by nesting the method invocation within SQLResultSet.set to store the number of rows affected (1, in this case) in the procedure's result set:
CREATE PROCEDURE sis_rowCount()
RESULT ( ins_recs INTEGER )
BEGIN
SQLPStatement insert_test103 = new SQLPStatement (
"INSERT INTO test103 (fld1) values (17)");
insert_test103.execute();
SQLResultSet.set(1,new Long(insert_test103.rowCount()));
SQLResultSet.insert();
END