Microsoft SDK for Java

executeUpdate

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)

executeUpdate()

Syntax

public int executeUpdate();

Return Value

Returns an integer designating the affected records.

executeUpdate(Object[] parameters)

Syntax

public int executeUpdate(Object[] parameters);

Return Value

Returns an integer designating the affected records.

Parameters

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.)

executeUpdate(Object[] parameters, int options)

Syntax

public int executeUpdate(Object[] parameters, int options);

Return Value

Returns an integer designating the affected records.

Parameters

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.

© 1999 Microsoft Corporation. All rights reserved. Terms of use.