I'm new on Postgres. I'm trying to perform the following code (that works with MySQL) using java / postgres jdbc:
for (int i = 0; i < arr.size(); i++)
{
dtoIdent ident = arr.get(i);
stIns.setLong(1, idInterface);
stIns.setString(2, tipo);
try { stIns.executeUpdate(); }
catch (SQLException sqe)
{
stUpd.setString(1, ident.getTipo());
stUpd.executeUpdate();
}
}
The connection is in autcommit = false. 'stIns' and 'stUpd' are 'PreparedStatements'.
I'm getting a 25P02.
Is it possible to do this with Postgres? Any workaround?
Many thanks,
Joan.