how to store blob in lvarbinary column

leszcz77

New Member
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:
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.
 
What version of Progress are you using?
Are you sure the datatype is lvarbinary and not varbinary or lvarchar?

regards,
Casper.
 
I'm using Progress OpenEdge 10.1A.
SQL used to create table:
Code:
create table pub.blobtest (
id integer primary key,
colblob lvarbinary(1000000))
 
Back
Top