Statement.executeUpdate(String) Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Executes a SQL INSERT, UPDATE, or DELETE statement.
public:
virtual int executeUpdate(System::String ^ _statement);
public virtual int executeUpdate (string _statement);
abstract member executeUpdate : string -> int
override this.executeUpdate : string -> int
Public Overridable Function executeUpdate (_statement As String) As Integer
Parameters
- _statement
- String
The string that contains the SQL statement being passed to the database.
Returns
An updated row count; otherwise, 0 (zero) for SQL statements that return nothing.
Remarks
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 . The following are safer alternatives for interacting with the database:
- Queries
- Views
- X++ select statements
Record level security is not enforced on the Statement class. If data is exposed to the user, perform explicit security validation.