Re: No. of rows selected
Posted in 1998
In article <34F3D2A3.ECA2A583@sgen.com.au>, Adam Sorati <adams@sgen.com.au> writes >Informix On-line 5.x >ISQL 4.x > >Hello, > >I have a cursor in which I create from a query by example, I then use a >foreach statement >to display each row. Is there anyway of displaying the total number of >records selected to >the user. I looked at the value of SQLCA.SQLERRD[3] directly after the >foreach statement >but it always has a value of zero. > >I am currently using a second cursor to select the count(*) which is >making the selection >very slow because I'm doing 2 selection. > At the moment I fetch all the rows and keep a counter. A better version would be to use FETCH ABOLSUTE on the cursor and use a binary search. >Thank you for reading my question I hope you can help me. > >Adam Sorati > -- David Williams Maintainer of the Informix FAQ Primary site (Beta Version) http://www.smooth1.demon.co.uk Official site http://www.iiug.org/techinfo/faq/faq_top.html I see you standin', Standin' on your own, It's such a lonely place for you, For you to be If you need a shoulder, Or if you need a friend, I'll be here standing, Until the bitter end... So don't chastise me Or think I, I mean you harm... All I ever wanted Was for you To know that I care