日期:2014-05-16  浏览次数:20452 次

黑马程序员__JDBC主要功能的代码实现及工厂模式

---------------------- android培训java培训、期待与您交流! ----------------------

 

存入和读取大文本文件

publicclass ClobTest {

    publicstaticvoid main(String[] args) throws Exception{

       //create();

       read();

    }

//读取大文本文件

    publicstaticvoid read()throws Exception{

       Connection conn=null;

       Statement st=null;

       ResultSet rs=null;

       try{

           conn=JDBCUtils.getConnection();

           String sql="select big_text from clob_text";

           st=conn.createStatement();

           rs=st.executeQuery(sql);