Hallo ,
ich möchte ein pgSQL-Update aus Java machen.
Dazu habe ich die unten stehende Mehtode definiert.
Beim Ausführen zeigt Java keinen Fehler an. Allerdings wird nichts in der db geändert.
Eine Abfrage der Prozesse ergibt:
current_query
Was ist falsch?
Gruß,
Kudo
DataSource ds = null;
public void execUpdate(String sql) throws DBException {
Connection conn = null;
Statement stmt = null;
try {
conn = ds.getConnection(); // getting the connection from the pool
stmt = conn.createStatement(ResultSet.TYPE_SCROLL_INSENSITIVE,
ResultSet.CONCUR_UPDATABLE);
stmt.execute(sql);
stmt.close();
stmt = null;
conn.close();
conn = null;
} catch (SQLException e) {
e.printStackTrace();
} finally {
}
if (stmt != null) {
try {
stmt.close();
} catch (SQLException e) {
;
}
stmt = null;
}
if (conn != null) {
try {
conn.close();
} catch (SQLException e) {
;
}
conn = null;
}