fromFile = new byte[1024];
Statement s = conn.createStatement();
s.execute("create table clobtable3(n int)");
s.execute("alter table clobtable3 add column clobCol CLOB(1M)");
s.close();
Clob clob = buildAndInsertClobValue(0000,"short.txt",conn);
Clob clob1 = buildAndInsertClobValue(1000, "aclob.txt",conn);
Clob clob2 = buildAndInsertClobValue(2000,"littleclob.txt",conn);
PreparedStatement ps3 = conn.prepareStatement("select * from " +
"clobtable3 where n=1000");
ResultSet rs3 = ps3.executeQuery();
rs3.next();
Clob clob3 = rs3.getClob(2);
if(!compareClob(clob1,clob3)) {
System.out.println("Difference between the inserted and the " +
"queried Clob values");
}
PreparedStatement ps4 = conn.prepareStatement("select * from " +
"clobtable3");
ResultSet rs4 = ps4.executeQuery();
rs4.next();
Clob clob4 = rs4.getClob(2);
if(!compareClob(clob,clob4)) {
System.out.println("Difference between the inserted and the " +
"queried Clob values");
}
rs4.next();