Condividi tramite


IStatement.Close Method

Definition

Releases this Statement object's database and JDBC resources immediately instead of waiting for this to happen when it is automatically closed.

[Android.Runtime.Register("close", "()V", "GetCloseHandler:Java.Sql.IStatementInvoker, Mono.Android, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null")]
public void Close ();
[<Android.Runtime.Register("close", "()V", "GetCloseHandler:Java.Sql.IStatementInvoker, Mono.Android, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null")>]
abstract member Close : unit -> unit
Attributes

Exceptions

if an error occurs accessing the database.

Remarks

Releases this Statement object's database and JDBC resources immediately instead of waiting for this to happen when it is automatically closed. It is generally good practice to release resources as soon as you are finished with them to avoid tying up database resources.

Calling the method close on a Statement object that is already closed has no effect.

<B>Note:</B>When a Statement object is closed, its current ResultSet object, if one exists, is also closed.

Java documentation for java.sql.Statement.close().

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