jdbc hibernate ibatis 操作Blob 和Clob类型字段(不断更新)

Class TestPhoto{

     private Blob image;

     private String cretateDate;

 

     get()... set()... 方法

}

hibernate Blob 数据写入

 

FileInputStream img = new FileInputStream("d://test.jpg");
Blob img = (Blob) Hibernate.createBlob(img);
TestPhoto po=new TestPhoto();

po.setImage(img); 

getSession().save(blobtest);

 

 

 

 

过两天把jdbc和ibatis的写入和读出加上

你可能感兴趣的:(Hibernate,ibatis,jdbc,image,String,Class)