Home » Developer & Programmer » Precompilers, OCI & OCCI » How many records did UPDATE update?
How many records did UPDATE update? [message #117605] Thu, 28 April 2005 09:04 Go to next message
TonyHoyt
Messages: 5
Registered: April 2005
Junior Member
Their are times when I want to know just how many records my UPDATE sql command updated. Primarly when I want to know if it updated 0 records which tells me that the record didn't exist in the first place and I should flag an error. Right now, I go thru and try to do a SELECT then UPDATE. That seems like an extra operation too many in most cases.

Note, I'm using OCI for this project. So we're talking c here, not C++.

Tony
Re: How many records did UPDATE update? [message #117671 is a reply to message #117605] Thu, 28 April 2005 16:12 Go to previous message
Michael Hartley
Messages: 110
Registered: December 2004
Location: West Yorkshire, United Ki...
Senior Member

Hi

You can get the attribute value for OCI_ATTR_ROW_COUNT from the statement handle immediately after the ocistmtexecute command has completed.

Kind regards,
Michael Hartley, http://www.openfieldsolutions.co.uk
Previous Topic: data type??
Next Topic: pro*C error with Oracle 9i
Goto Forum:
  


Current Time: Fri Apr 19 22:09:47 CDT 2024