I have just upgrading my database to 7.2.1 (I was on 7.1.3)
There are some little funnies between the two versions, mostly things
that have been tightened up in 7.2.1.
However, I have found the this code that used to work now fails. It is
code for writting a blob (image) back into the database.
File file = new File(imageFileName);
FileInputStream fis = new FileInputStream(file);
int length = (int)file.length();
pStmt.setBinaryStream(1, fis, length);
pStmt.setInt(2, currentEmployee);
int upd = pStmt.executeUpdate();
It now fails with this....
java.sql.SQLException: ERROR: oidin: error in "~DGR:LOGO,09180,054,000000000000000.........
can't parse "~DGR:LOGO,09180,054,000000000000000........ etc, etc ....
at org.postgresql.core.QueryExecutor.execute(QueryExecutor.java:94)
at org.postgresql.Connection.ExecSQL(Connection.java:398)
at org.postgresql.jdbc2.Statement.execute(Statement.java:130)
at org.postgresql.jdbc2.Statement.executeUpdate(Statement.java:73)
at org.postgresql.jdbc2.PreparedStatement.executeUpdate(PreparedStatement.java:113)
at com.dunlops.warehouse.checking.SetCustomerLogo.saveLogo(SetCustomerLogo.java:124)
What's wrong?