This topic has not yet been rated - Rate this topic

Statement.executeUpdate Method

Executes a SQL INSERT, UPDATE, or DELETE statement.


public int executeUpdate(str statement)

Called

Parameter

Description

statement

The string that contains the SQL statement being passed to the database.

An updated row count; otherwise, 0 (zero) for SQL statements that return nothing.

SQL statements that return nothing, such as SQLDDL statements, can also be executed.

If users control input to the executeUpdate method, an SQL injection thread can occur. Therefore, this method runs under Code Access Security. Calls to this method on the server require permission from the SqlStatementExecutePermission Class. The following are safer alternatives for interacting with the database:

Record level security is not enforced on the Statement class. If data is exposed to the user, perform explicit security validation.

Did you find this helpful?
(1500 characters remaining)
Community Content Add
Annotations FAQ