cant save blobs over 2k on oracle


2003-07-23 06:01:56 PM
jbuilder22
whenever i save a blob field to our oracle8i db, if i try and save a blob
over 2k nothing appears to get saved. I'm not a dba so it could be the
oracle setup. heres the code i'm using:
Connection con = null;
PreparedStatement pStmt = null;
ByteArrayInputStream inStream = null;
try {
strBlob = strBlob.trim();
con =
DriverManager.getConnection("jdbc:oracle:thin:@"+oracleServer+":1521:"+TNSse
rvice_name, dbUser, dbPassword);
pStmt = con.prepareStatement("UPDATE "+tableName+" SET
"+blobFieldName+" = ? WHERE "+keyFieldName+" = ?");
inStream = new ByteArrayInputStream(strBlob.getBytes());
pStmt.setBinaryStream(1,inStream,strBlob.length()*2);
pStmt.setString(2,keyFieldValue);
pStmt.executeUpdate();
out.println("pStmt.getWarnings();=("+pStmt.getWarnings()+")<br>");
return true;
} catch (Exception sb1) {
sb1.printStackTrace(out);
return false;
}
no exception is thrown, and no getWarnings returns null.
any help would be appreciated
richard
P.S. I'm using JBuilder6 and deploying this code within a servlet on a
BES5.0 server on a win 2k server platform