다음을 통해 공유


IConnection.Close Method

Definition

Releases this Connection object's database and JDBC resources immediately instead of waiting for them to be automatically released.

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

Exceptions

if there is a problem accessing the database.

Remarks

Releases this Connection object's database and JDBC resources immediately instead of waiting for them to be automatically released.

Calling the method close on a Connection object that is already closed is a no-op.

It is <b>strongly recommended</b> that an application explicitly commits or rolls back an active transaction prior to calling the close method. If the close method is called and there is an active transaction, the results are implementation-defined.

Java documentation for java.sql.Connection.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