Android examples for Database:Database Connection
Releases a SQL Connection resource.
//package com.book2s; import java.sql.Connection; import java.sql.SQLException; public class Main { /**//from ww w . j a va 2 s .c o m * Releases a SQL Connection resource. * * @parameter sqlConnection * A SQL Connection object. It's okay if this object is null or if it was * never given an actual connection to a SQL database. */ public static void closeSQLConnection(final Connection sqlConnection) { if (sqlConnection != null) { try { sqlConnection.close(); } catch (final SQLException e) { } } } }