GeeCON Prague 2014*
The moose likes JDBC and the fly likes Error inserting byte[] to Oracle BLOB Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


JavaRanch » Java Forums » Databases » JDBC
Bookmark "Error inserting byte[] to Oracle BLOB" Watch "Error inserting byte[] to Oracle BLOB" New topic
Author

Error inserting byte[] to Oracle BLOB

Manju Gannaboina
Greenhorn

Joined: Mar 21, 2006
Posts: 1
Hi,

I am getting an error when I try to insert a byte[] into BLOB column.
The error message is : [BEA][Oracle JDBC Driver]long (>4k) parameters are only allowed in the values list of simple insert/update statements

// below is the lines of code
private byte[] fileData;
PreparedStatement stmt = conn.prepareStatement("INESRT INTO test VALUES ( 1, ?)" );
stmt.setBytes(1, this.fileData);
int testIDID = stmt.executeUpdate();

Can anyone help me here.

Thanks in advance
Manju
 
GeeCON Prague 2014
 
subject: Error inserting byte[] to Oracle BLOB