Hi,
I'm trying to store binary data in lvarbinary column. I'm using DataDirect jdbc driver included in OpenEdge 10.1A. Everything works fine when the binary data is smaller than 32000 bytes.
Here is the piece of code that i'm using:
When I try to store longer data driver returns error: [DataDirect][OpenEdge JDBC Driver][OpenEdge] Long data exceeds column width.
Could anyone explain how to store longer data in lvarbinary column?
Thanks in advance.
I'm trying to store binary data in lvarbinary column. I'm using DataDirect jdbc driver included in OpenEdge 10.1A. Everything works fine when the binary data is smaller than 32000 bytes.
Here is the piece of code that i'm using:
Code:
sql = "insert into PUB.blobtable(id,file) values (?, ?)";
stmt = con.prepareStatement(sql);
File file = new java.io.File(...);
InputStream fs = new FileInputStream(file);
stmt.setInt(1, 1);
stmt.setBinaryStream(2, fs, (int)file.length());
stmt.execute();
stmt.close();
con.close();
When I try to store longer data driver returns error: [DataDirect][OpenEdge JDBC Driver][OpenEdge] Long data exceeds column width.
Could anyone explain how to store longer data in lvarbinary column?
Thanks in advance.