Re: [Q] Pro*C: How many rows selected?

From: Henri M.B. van den Bulk <hvdbulk_at_lgc.com>
Date: 1995/10/04
Message-ID: <44ul46$9dl_at_dildog.lgc.com>#1/1


schnabl_at_aut.alcatel.at (Wolfgang Schnabl) wrote:
>A Pro*C question:
>Is there a possibility to get the number of rows selected after an
>OPEN CURSOR statement *before* doing a FETCH?
>(after the FETCH I can see the fetched rows in sqlca.sqlerrd[2]).

After a open statement sqlca.sqlerrd[2] is zeroed and incremented after a FETCH.

sqlca.sqlerrd[2] only contains the number of rows for EXECUTE,INSERT, UPDATE DELETE and SELECT INTO statements.

>
>or do I have to use "SELECT count(*)" first, which means actually doing
>the same call twice?
>
>I'm using Pro*C 1.5, ORACLE 7.1

That's just what I do. But I'm looking into methods of getting the number of rows after the OPEN. It seems to me that Pro*C must store this somewhere to indicate it internal.



 Henri van den Bulk
 MGI Tulsa
 A Landmark Graphics Corp.
 5506 South Lewis Avenue
 Tulsa, OK 74105 USA
 tel. +1-918-749-7498, fax. +1-918-749-5556  E-mail: hvdbulk_at_lgc.com
	Art has to be forgotten, beauty has to be realised.
		Mondriaan
Received on Wed Oct 04 1995 - 00:00:00 CET

Original text of this message