<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)  編輯  收藏


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


    網站導航:
     

    公告

    希望有一天

    我能用鼠標雙擊我的錢包

    然后選中一張100元

    按住“ctrl+c”

    接著不停的“ctrl+v”

    嘻嘻~~~笑醒~~~



    導航

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

    統計

    常用鏈接

    留言簿(6)

    隨筆分類(102)

    隨筆檔案(398)

    文章分類

    文章檔案(10)

    有趣網絡

    搜索

    積分與排名

    最新評論

    閱讀排行榜

    評論排行榜

    主站蜘蛛池模板: 美女羞羞喷液视频免费| 亚洲色www永久网站| 两个人的视频www免费| 国产亚洲精品免费视频播放| 日本视频免费观看| 亚洲日韩在线观看| 精品熟女少妇aⅴ免费久久| 久久久久亚洲?V成人无码| 国产一级一毛免费黄片| 精品国产亚洲一区二区三区| 无码国模国产在线观看免费| 亚洲日本成本人观看| 国产无遮挡吃胸膜奶免费看| 暖暖免费中文在线日本| 国产亚洲精品精华液| 久草免费福利资源站| 亚洲中文字幕久久精品无码2021| 久久99九九国产免费看小说| 亚洲日韩一页精品发布| 老湿机一区午夜精品免费福利| 亚洲高清无码综合性爱视频| 国产男女爽爽爽免费视频| 亚洲av无码乱码国产精品fc2| 97性无码区免费| 久久亚洲精品无码gv| 亚洲中文字幕不卡无码| 1000部啪啪未满十八勿入免费| 国产精品亚洲午夜一区二区三区 | 亚洲人成电影亚洲人成9999网| 美女视频黄的全免费视频网站| 亚洲AV香蕉一区区二区三区| 亚洲国产av无码精品| 99视频免费观看| 色偷偷噜噜噜亚洲男人| 中文字幕亚洲日韩无线码| 最近2022中文字幕免费视频| 亚洲日韩乱码中文字幕| 亚洲av综合av一区| 在线观看人成网站深夜免费| 国产精品偷伦视频观看免费| 亚洲乱人伦中文字幕无码|