Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.tools -> Re: OCI 8.1.6: query rows counts?

Re: OCI 8.1.6: query rows counts?

From: namsii <namsiiNOnaSPAM_at_mailcity.com.invalid>
Date: 2000/07/21
Message-ID: <158e1d12.0ac6d947@usw-ex0106-046.remarq.com>#1/1

notMe_at_over.there.com (Snarf Man) wrote:
>Actually, this only returns "the number of rows processed
>so far", not the number of rows that match the query.
>
>In article <38EB1221.1823_at_sprynet.com>, Sergei Kuchin wrote:
>>ub4 rpc(void)
>> {sb4 rpc;
>> status=OCIAttrGet
>> ((dvoid *)cda,
>> (ub4)OCI_HTYPE_STMT,
>> (dvoid *) &rpc,
>> (ub4 *) 0,
>> (ub4)OCI_ATTR_ROW_COUNT,
>> errhp);
>> if(status)return 0;
>> return rpc;
>> }
>>
>>where cda is the statement handle.
>>
>>Sergei
>>
>>Snarf Man wrote:
>>>
>>> Hello,
>>> I am using Oracle 8.1.6 OCI stuff.
>>>
>>> I have a query statement that looks something like
>>>
>>> select a, b from c where a like 'something%';
>>>
>>> If I set 'iters' in OCIStmtExecute() to say 10 and there are
 only
>>> 8 matches in the DB, OCIStmtExecute() returns OCI_NO_DATA.
 Bummer.
>>>
>>> If I set 'iters' to 1, then I get them all.
>>>
>>> Is there a way to determine how many rows matched they query
 without
>>> having to do two queries?
>>>
>>> --
>>>
>>> ---------------------------------------------------------
>>> Mark Crosland
>>> Remove the leading and trailing 00 from reply-to address.
>>> ---------------------------------------------------------
>
>
>--
>
>---------------------------------------------------------
>Mark Crosland
>Remove the leading and trailing 00 from reply-to address.
>---------------------------------------------------------
>
>
>


Got questions? Get answers over the phone at Keen.com. Up to 100 minutes free!
http://www.keen.com Received on Fri Jul 21 2000 - 00:00:00 CDT

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US