Note
MySql does not return the correct count for a
delete statement that has
no where clause. Therefore, to assure the correct update count is returned,
either include a where clause, or understand that the value will always be
0.
java.sql.Statement#getUpdateCount()
| Modifier and Type | Field and Description |
|---|---|
| private static boolean | |
| public int | updateCount
The update count for the last executed statement. |
| Access | Constructor and Description |
|---|---|
| public |
| Modifier and Type | Method and Description |
|---|---|
| public void | postExecute(Statement stmt)
Overrides com. Gets the update count from the statement after successfully executing. |
| public void | preExecute(Statement stmt)
Overrides com. Sets the update count to |
| once | back to summary |
|---|---|
| private static boolean once | |
| updateCount | back to summary |
|---|---|
| public int updateCount The update count for the last executed statement. | |
| UpdateCountDataHandler | back to summary |
|---|---|
| public UpdateCountDataHandler(DataHandler datahandler) Handle capturing the update count. The initial value of the updateCount is
| |
| postExecute | back to summary |
|---|---|
| public void postExecute(Statement stmt) throws SQLException Overrides com. Gets the update count from the statement after successfully executing. | |
| preExecute | back to summary |
|---|---|
| public void preExecute(Statement stmt) throws SQLException Overrides com. Sets the update count to | |