getUpdateCount()

Returns the number of rows affected by the last write operation to the database.

Syntax

int getUpdateCount()
 

Parameters

None.

Return values

Returns an int representing the number of rows affected by the last write operation.

Exceptions

CwDBConnectionException - If a database error occurs.

Notes

The getUpdateCount() method indicates how many rows have been modified by the most recent update operation in the database associated with the current connection. This method is useful after you send an UPDATE or INSERT statement to the database and you want to determine the number of rows that the SQL statement has affected.

Important:
Before using this method, you must create a CwDBConnection object with the getDBConnection() method from the BaseDLM class and send a query that updates the database with either the executeSQL() or executePreparedSQL() method from the CwDBConnection class.

See also

executePreparedSQL(), executeSQL(), getDBConnection()

Copyright IBM Corp. 1997, 2003