Quantcast
Channel: IBM Mainframe Computers Forums
Viewing all articles
Browse latest Browse all 9405

DB2 :: RE: Access SQLCA fields inside a stored procedure accessing Db2

$
0
0
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)

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!


Viewing all articles
Browse latest Browse all 9405

Trending Articles