X-Git-Url: https://code.wpia.club/?a=blobdiff_plain;f=src%2Forg%2Fcacert%2Fgigi%2Fdatabase%2FGigiPreparedStatement.java;h=eae804b800d20fb6cc29de98ff3c56a624b56a66;hb=2f50dbb24105e6345329b8e9ecb5ef4d67ab2a8c;hp=411b1fd5fb840056fa5000acc58d1d8be7a164aa;hpb=a0232b6e40e7e09767f0444d24e18bf12dafc362;p=gigi.git diff --git a/src/org/cacert/gigi/database/GigiPreparedStatement.java b/src/org/cacert/gigi/database/GigiPreparedStatement.java index 411b1fd5..eae804b8 100644 --- a/src/org/cacert/gigi/database/GigiPreparedStatement.java +++ b/src/org/cacert/gigi/database/GigiPreparedStatement.java @@ -22,11 +22,7 @@ public class GigiPreparedStatement implements AutoCloseable { public GigiPreparedStatement(String stmt, boolean scroll) { try { - if (scroll) { - target = DatabaseConnection.getInstance().prepareInternalScrollable(stmt); - } else { - target = DatabaseConnection.getInstance().prepareInternal(stmt); - } + target = DatabaseConnection.getInstance().prepareInternal(stmt, scroll); } catch (SQLException e) { throw new Error(e); } @@ -133,7 +129,11 @@ public class GigiPreparedStatement implements AutoCloseable { } PreparedStatement tg = target; target = null; - DatabaseConnection.getInstance().returnStatement(tg); + try { + DatabaseConnection.getInstance().returnStatement(tg); + } catch (SQLException e) { + throw new Error(e); + } }