Java.Sql.IStatement.Execute Method
Executes the supplied SQL statement.

Syntax

[Android.Runtime.Register("execute", "(Ljava/lang/String;[Ljava/lang/String;)Z", "GetExecute_Ljava_lang_String_arrayLjava_lang_String_Handler:Java.Sql.IStatementInvoker, Mono.Android, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null")]
public bool Execute (string sql, string[] columnNames)

Parameters

sql
the SQL statement to execute.
columnNames
an array of column names in the inserted row which should be made available for retrieval via the getGeneratedKeys method.

Returns

Documentation for this section has not yet been entered.

Exceptions

TypeReason
Java.Sql.SQLExceptionif an error occurs accessing the database.

Remarks

Executes the supplied SQL statement. This may return multiple ResultSets. This method allows retrieval of auto generated keys specified by the supplied array of column indexes, if the SQL statement is an INSERT statement.

Use the getResultSet or getUpdateCount methods to get the first result and getMoreResults to get any subsequent results.

[Android Documentation]

Requirements

Namespace: Java.Sql
Assembly: Mono.Android (in Mono.Android.dll)
Assembly Versions: 0.0.0.0
Since: Added in API level 1