数据库表结构
CREATE TABLE LM_DATA_KEY
(
KEY BLOB,
ID NUMBER
)
1. 如何写入KEY字段 :
//
Remove old record with id=1
PreparedStatement pstmt = conn.prepareStatement( " delete from lm_data_key where id=1 " );
pstmt.executeUpdate();
// Insert empty blob field
pstmt = conn.prepareStatement( " insert into lm_data_key (key, id) values(empty_Blob(), 1) " );
pstmt.executeUpdate();
PreparedStatement pstmt = conn.prepareStatement( " delete from lm_data_key where id=1 " );
pstmt.executeUpdate();
// Insert empty blob field
pstmt = conn.prepareStatement( " insert into lm_data_key (key, id) values(empty_Blob(), 1) " );
pstmt.executeUpdate();