fromFile = new byte[1024];
Statement s = conn.createStatement();
s.execute("create table blobtable3(n int)");
s.execute("alter table blobtable3 add column blobCol BLOB(1M)");
s.close();
Blob blob = buildAndInsertBlobValue(0000, "short.txt", conn);
Blob blob1 = buildAndInsertBlobValue(1000, "aclob.txt", conn);
Blob blob2 = buildAndInsertBlobValue(2000, "littleclob.txt", conn);
PreparedStatement ps3 = conn.prepareStatement("select * from " +
"blobtable3 where n=1000");
ResultSet rs3 = ps3.executeQuery();
rs3.next();
Blob blob3 = rs3.getBlob(2);
if(!compareBlob(blob1,blob3)) {
System.out.println("Difference between the inserted and the " +
"queried Blob values");
}
PreparedStatement ps4 = conn.prepareStatement("select * from blobtable3");
ResultSet rs4 = ps4.executeQuery();
rs4.next();
Blob blob4 = rs4.getBlob(2);
if(!compareBlob(blob,blob4)) {
System.out.println("Difference between the inserted and the " +
"queried Blob values");
}
rs4.next();