<rt id="bn8ez"></rt>
<label id="bn8ez"></label>

  • <span id="bn8ez"></span>

    <label id="bn8ez"><meter id="bn8ez"></meter></label>

    Loading...

    java .net

    Oracle insert大字符串方法


    Oracle insert大字符串方法
    try {
                conn = getConnection();
                pstmt = conn
                        .prepareStatement("Insert into offidutychk(decno,offino,checkdate,checkcontent) "+
                                            "Values(seq_decno.nextval, ?,?,?)");
                pstmt.setString(1, hezhi.getOffino());
                pstmt.setDate(2, hezhi.getCheckDate());
                pstmt.setCharacterStream(3,
                        new InputStreamReader(new ByteArrayInputStream(hezhi.getCheckContent().getBytes())), hezhi.getCheckContent().length());
                //pstmt.setString(3, hezhi.getCheckContent());
               
    //            判斷插入操作是否成功
                if (pstmt.executeUpdate() == 1)
                    succ = true;
                else
                    succ = false;
            } catch (Exception e) {
                succ = false;
                e.printStackTrace();
            } finally {
                try {
                    pstmt.close();
                } catch (Exception e) {
                    e.printStackTrace();
                    // TODO: handle exception
                }
               
                closeConnection(conn);
            }







    Oracle update大字符串方法
            Connection conn = null;
            PreparedStatement pstmt = null;
            int length=hezhi.getCheckContent().length();
            String s1="";
            String s2="";
            if(length>1000){
                s1=hezhi.getCheckContent().substring(0,1000);
                s2=hezhi.getCheckContent().substring(1000,length);
            }else{
                s1=hezhi.getCheckContent();
               
            }
    try {
                conn = getConnection();
                pstmt = conn
                        .prepareStatement("update offidutychk set checkdate=?,checkcontent=?||? "+
                                            "where decno=?");
               
                pstmt.setDate(1, hezhi.getCheckDate());
               
    //            pstmt.setCharacterStream(2,
    //                    new InputStreamReader(new ByteArrayInputStream(hezhi.getCheckContent().getBytes())), hezhi.getCheckContent().length());
    //            //pstmt.setString(2, hezhi.getCheckContent());
                pstmt.setString(2, s1);
                pstmt.setString(3, s2);
                pstmt.setInt(4, hezhi.getDecno());
               
    //            判斷更新操作是否成功
                if (pstmt.executeUpdate() == 1)
                    succ = true;
                else
                    succ = false;
            } catch (Exception e) {
                succ = false;
                e.printStackTrace();
            } finally {
                try {
                    pstmt.close();
                } catch (Exception e) {
                    e.printStackTrace();
                }
               
                closeConnection(conn);
            }

    posted on 2008-08-26 22:06 閱讀(768) 評論(0)  編輯  收藏


    只有注冊用戶登錄后才能發(fā)表評論。


    網(wǎng)站導(dǎo)航:
     

    公告

    希望有一天

    我能用鼠標(biāo)雙擊我的錢包

    然后選中一張100元

    按住“ctrl+c”

    接著不停的“ctrl+v”

    嘻嘻~~~笑醒~~~



    導(dǎo)航

    <2008年8月>
    272829303112
    3456789
    10111213141516
    17181920212223
    24252627282930
    31123456

    統(tǒng)計(jì)

    常用鏈接

    留言簿(6)

    隨筆分類(102)

    隨筆檔案(398)

    文章分類

    文章檔案(10)

    有趣網(wǎng)絡(luò)

    搜索

    積分與排名

    最新評論

    閱讀排行榜

    評論排行榜

    主站蜘蛛池模板: 99热亚洲色精品国产88| 亚洲综合久久精品无码色欲| 99久久99这里只有免费的精品| 亚洲综合av永久无码精品一区二区| 免费无码又爽又刺激网站 | 亚洲国产成人AV在线播放| 午夜亚洲av永久无码精品| 猫咪www免费人成网站| 久久国产成人亚洲精品影院| 国产精品青草视频免费播放| 久久久久亚洲AV无码专区体验| 中文字幕无码成人免费视频| 久久亚洲精品无码av| 亚洲自偷自偷在线制服| 日本三级2019在线观看免费| 精品一区二区三区免费毛片| 亚洲热线99精品视频| 国产成在线观看免费视频| 免费很黄无遮挡的视频毛片| 亚洲国语精品自产拍在线观看| 我想看一级毛片免费的| aaa毛片免费观看| 亚洲精品免费在线视频| 免费大黄网站在线观看| 日本一卡精品视频免费| 国产成人精品亚洲| 色婷婷六月亚洲婷婷丁香| 国产成人免费a在线视频app | 亚洲人成网站看在线播放| 国产成人精品日本亚洲18图| 免费在线观看的黄色网址| 野花高清在线观看免费完整版中文 | 亚洲日韩精品无码专区网站 | 亚洲黑人嫩小videos| 国产亚洲色视频在线| 免费在线观看亚洲| 在线播放高清国语自产拍免费| 国产成人免费午夜在线观看| a毛片在线还看免费网站| 成人免费网站久久久| 国产精品亚洲片在线花蝴蝶|