boolean bDefault;
int iC;
oracle.sql.BLOB m_Blob;
bDefault=odbcConn.getAutoCommit();
odbcConn.setAutoCommit(false);
odbcStmt.executeUpdate("insert into Project_Design(ID,Category,Subject,Body,Author,History) values(IDSERIAL.nextval,'"+(String)session.getValue("Category")+"','"+(String)session.getValue("Subject")+"',EMPTY_BLOB(),'"+Author+"','"+History+"')");
odbcQuery="select * from Project_Design order by ID asc";
odbcRs=odbcStmt___.executeQuery(odbcQuery);
odbcRs.last();
String iID=String.valueOf((int)odbcRs.getInt("ID"));
odbcQuery="select Body from Project_Design where ID="+iID+" for Update";
odbcRs=odbcStmt___.executeQuery(odbcQuery);
if(odbcRs.next())
{
m_Blob=(oracle.sql.BLOB)odbcRs.getBlob("Body");
BufferedOutputStream pOut=new BufferedOutputStream(m_Blob.getBinaryOutputStream());
ByteArrayInputStream pIn=new ByteArrayInputStream((byte[])session.getValue("FieldName"));
while((iC=pIn.read())!=-1)
{pOut.write(iC);}
pIn.close();
pOut.close();
}
odbcConn.commit();
odbcConn.setAutoCommit(bDefault);