//数据库中储存大文本
public static void Rclob() throws Exception{
Connection conn=null;
PreparedStatement ps=null;
try {
conn=DaoUtils.getConnection();
String sql="insert into tiezhi(name,content) value('yang',?)";
ps=conn.prepareStatement(sql);
BufferedReader reader=new BufferedReader( new FileReader(new File("C:\\Users\\光跃\\Desktop\\1.txt")));
ps.setCharacterStream(1, reader,500);
int i=ps.executeUpdate();
System.out.println(i);
} catch (SQLException e) {
// TODO Auto-generated catch block
e.printStackTrace();
}finally{
DaoUtils.free(null, ps, conn);
}
}