Hallo,
hast Du eigentlich schon versucht die Anzahl Sätze über GET DIAGNOSTICS unmittelbar nach dem OPEN zu ermitteln?
Aber vermutlich führt dies zum gleichen Ergebnis wie SQLERR2.PHP-Code:EXEC SQL GET DIAGNOSTICS :MyVar = DB2_NUMBER_ROWS;
SQL Reference:
BirgittaDB2_NUMBER_ROWS
If the previous SQL statement was an OPEN or a FETCH which caused the size of the result table to be known, returns the number of rows in the result table. For SENSITIVE cursors, this value can be thought of as an approximation since rows inserted and deleted will affect the next retrieval of this value. If the previous statement was a PREPARE statement, returns the estimated number of rows in the result table for the prepared statement. Otherwise, the value zero is returned.
![[NEWSboard IBMi Forum]](images/duke/nblogo.gif)



Mit Zitat antworten
Bookmarks