Click here to view and discuss this page in DocCommentXchange. In the future, you will be sent there automatically.

SQL Anywhere 10.0.1 » UltraLite - .NET Programming » UltraLite .NET 1.0 API Reference » ULCommand class

CreateParameter method Next Page

ExecuteNonQuery method


Executes a statement that does not return a result set, such as a SQL INSERT, DELETE, or UPDATE statement.

Syntax

Visual Basic

NotOverridable Public Function ExecuteNonQuery() As Integer _
Implements IDbCommand.ExecuteNonQuery

C#

public int ExecuteNonQuery();

Return value

The number of rows affected.

Remarks

The statement is the current ULCommand object, with the ULCommand.CommandText and ULCommand.Parameters as needed.

For UPDATE, INSERT, and DELETE statements, the return value is the number of rows affected by the command. For all other types of statements, and for rollbacks, the return value is -1.

The ULCommand.CommandType cannot be System.Data.CommandType.TableDirect.

Exceptions
Implements

[external link] IDbCommand.ExecuteNonQuery

See also