Udostępnij za pośrednictwem


IStatement.ExecuteQuery(String) Method

Definition

Executes the given SQL statement, which returns a single ResultSet object.

[Android.Runtime.Register("executeQuery", "(Ljava/lang/String;)Ljava/sql/ResultSet;", "GetExecuteQuery_Ljava_lang_String_Handler:Java.Sql.IStatementInvoker, Mono.Android, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null")]
public Java.Sql.IResultSet? ExecuteQuery (string? sql);
[<Android.Runtime.Register("executeQuery", "(Ljava/lang/String;)Ljava/sql/ResultSet;", "GetExecuteQuery_Ljava_lang_String_Handler:Java.Sql.IStatementInvoker, Mono.Android, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null")>]
abstract member ExecuteQuery : string -> Java.Sql.IResultSet

Parameters

sql
String

an SQL statement to be sent to the database, typically a static SQL SELECT statement

Returns

a ResultSet object that contains the data produced by the given query; never null

Attributes

Exceptions

if an error occurs accessing the database or if the statement produces anything other than a single ResultSet.

Remarks

Executes the given SQL statement, which returns a single ResultSet object.

<strong>Note:</strong>This method cannot be called on a PreparedStatement or CallableStatement.

Java documentation for java.sql.Statement.executeQuery(java.lang.String).

Portions of this page are modifications based on work created and shared by the Android Open Source Project and used according to terms described in the Creative Commons 2.5 Attribution License.

Applies to