From: Kevin English <kenglish@4csoftware.com>
Newsgroups: comp.databases.oracle.misc
Subject: Re: OCIStmtExecute return numbers
Message-ID: <06d7usg41j4mqbb81tjil99226qg7ul7r3@4ax.com>
References: <8rvs3h$9m1$1@lure.pipex.net>
X-Newsreader: Forte Agent 1.8/32.548
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
Lines: 35
Date: Wed, 11 Oct 2000 00:35:50 GMT
NNTP-Posting-Host: 207.14.63.220
X-Complaints-To: abuse@earthlink.net
X-Trace: newsread1.prod.itd.earthlink.net 971224550 207.14.63.220 (Tue, 10 Oct 2000 17:35:50 PDT)
NNTP-Posting-Date: Tue, 10 Oct 2000 17:35:50 PDT
Organization: EarthLink Inc. -- http://www.EarthLink.net


John,
This should work for your first question:

ub4 nrows;
OCIAttrGet(stmthp,OCI_HTYPE_STMT,&nrows,0,OCI_ATTR_ROW_COUNT,errhp);

On Tue, 10 Oct 2000 20:54:03 +0100, "John Savill"
<john@savilltech.com> wrote:

>Hi,
>
>I have an SQL statement which performs an update
>
>checkerr(errhp, status=OCIStmtExecute(svchp, stmthp, errhp, (ub4) 1, (ub4)
>0,
>        (CONST OCISnapshot *) 0, (OCISnapshot *) 0, (ub4) OCI_DEFAULT));
>
>How can I tell how many rows were updated?
>
>Also I have another SQL statement
>
>sprintf(tempSQL, "UPDATE COMPLETED SET AUDIT_TRAIL='%s', TS_LASTCHANGE='%s'
>where MMS_REF='%d'",AUDIT_TRAIL,timeStamp,mmsRefNo);
>
>and each time I try to run through OCI it seems incorrectly terminated
>string but if I take the SQL and run it manually it works fine!
>
>Thanks,
>
>John
>
>john@savilltech.com
>
>


