From: | Michael Andreasen <michael(at)dunlops(dot)com> |
---|---|
To: | pgsql-jdbc(at)postgresql(dot)org |
Subject: | Blob's that worked in 7.1 fail in 7.2.1 |
Date: | 2002-09-09 16:27:59 |
Message-ID: | 3D7CCC0F.70707@dunlops.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-jdbc |
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?
From | Date | Subject | |
---|---|---|---|
Next Message | Barry Lind | 2002-09-09 16:52:42 | Re: compile of jdbc driver failed - jdk 1.4.0_01 |
Previous Message | Laszlo Hornyak | 2002-09-09 14:49:20 | Re: postgresql-java |