This method of the Command class is a special-case method that calls the underlying ADO execute method with certain parameters. The executeUpdate method does not support the return of a Recordset object, so the execute method's options parameter is modified with AdoEnums.ExecuteOption.NORECORDS. After the execute method completes, its updated RecordsAffected parameter is passed back to the executeUpdate method, which is finally returned as an integer.
The executeUpdate method has the following signatures:
executeUpdate()
executeUpdate(Object[] parameters)
executeUpdate(Object[] parameters, int options)
public int executeUpdate();
Returns an integer designating the affected records.
public int executeUpdate(Object[] parameters);
Returns an integer designating the affected records.
parameters | Optional. A VARIANT array of parameter values passed with an SQL statement. (Output parameters will not return correct values when passed in this argument.) |
public int executeUpdate(Object[] parameters, int options);
Returns an integer designating the affected records.
parameters | Optional. A VARIANT array of parameter values passed with an SQL statement. (Output parameters will not return correct values when passed in this argument.) |
options | Optional. A Long value that indicates how the provider should evaluate the CommandText property of the Command object. Can be one or more CommandType or ExecuteOption values. |