Author: agkshirsagar
Subject: Reply to: Access SQLCA fields inside a stored procedure accessing Db2
Posted: Thu Jan 26, 2017 6:36 am (GMT 5.5)
How about counting rs (ResultSet object) hasNext() condition is true? You may as well add your row processing logic in this loop.
rs.last().getRow(); may NOT always work as most sites I've worked with use third party ODBC drivers to connect to DB2.
_________________
Simple is powerful!
Subject: Reply to: Access SQLCA fields inside a stored procedure accessing Db2
Posted: Thu Jan 26, 2017 6:36 am (GMT 5.5)
Quote: |
Currently we are using SELECT COUNT (*). Is there a better way of doing this? |
How about counting rs (ResultSet object) hasNext() condition is true? You may as well add your row processing logic in this loop.
rs.last().getRow(); may NOT always work as most sites I've worked with use third party ODBC drivers to connect to DB2.
_________________
Simple is powerful!