Hi,
I tried going thru the jdbc connection,statement, resultset API
documentation but i still cannot get a way to know if after a UPDATE
etc , how to find out
how many 'rows' were affected due to the executequery()?
BTW, I have been using preparedStatement.
can anyone advise?
thanking in advance,
rajkin
Thomas Kellerer - 07 Jul 2003 10:01 GMT
rajkin schrieb:
> Hi,
>
[quoted text clipped - 9 lines]
>
> rajkin
You shouldn't use executeQuery() for DB updates, executeUpdate() is
intended for that purpose
Quote from
http://java.sun.com/j2se/1.4.2/docs/api/java/sql/PreparedStatement.html#executeUpdate()
Returns:
either (1) the row count for INSERT, UPDATE, or DELETE statements
or (2) 0 for SQL statements that return nothing