|
On 29-May-2015 14:29 -0500, Mike Garrison wrote:
Code is as follows:
<<SNIP>>
vSQLRC = SQL_GetDescField(vDescHandle :vRecNum :SQL_DESC_COUNT
:pRowCount :vBLen :vSLen);
<<SNIP>>
AIUI the above request obtains the number of /records/ returned in the
descriptor, not the estimated number of rows in a result set.
Perhaps look at the following API instead, for which the
SQL_DIAG_ROW_COUNT might be the equivalent of SQLERRD(2):
<
http://www.ibm.com/support/knowledgecenter/ssw_ibm_i_72/cli/rzadpfndfld.htm
SQLGetDiagField - Return diagnostic information (extensible)
And for reference, per mention of SQLERRD:
<
http://www.ibm.com/support/knowledgecenter/ssw_ibm_i_72/db2/rbafzfielddescsqlca.htm
IBM i 7.2->Database->Reference->SQL reference->SQLCA (SQL communication
area)->
_Field descriptions_
SQLERRD(2) ...
...
For an OPEN statement, if the cursor is insensitive to
changes, SQLERRD(2) contains the actual number of rows in the result set.
If the cursor is sensitive to changes, SQLERRD(2) contains an estimated
number of rows in the result set.
..."
--
Regards, Chuck
--
This is the Midrange Systems Technical Discussion (MIDRANGE-L) mailing list
To post a message email: MIDRANGE-L@xxxxxxxxxxxx
To subscribe, unsubscribe, or change list options,
visit: http://lists.midrange.com/mailman/listinfo/midrange-l
or email: MIDRANGE-L-request@xxxxxxxxxxxx
Before posting, please take a moment to review the archives
at http://archive.midrange.com/midrange-l.
As an Amazon Associate we earn from qualifying purchases.
This mailing list archive is Copyright 1997-2024 by midrange.com and David Gibbs as a compilation work. Use of the archive is restricted to research of a business or technical nature. Any other uses are prohibited. Full details are available on our policy page. If you have questions about this, please contact [javascript protected email address].
Operating expenses for this site are earned using the Amazon Associate program and Google Adsense.