2007年8月9日

          歡迎光臨本人小站http://www.spartasoft.cn

          posted @ 2008-01-23 18:19 姜海龍 閱讀(205) | 評論 (0)編輯 收藏

          我的系統(tǒng)結(jié)構(gòu)是ssh,開發(fā)過程中一直使用sqlserver數(shù)據(jù)庫,后面換了oracle數(shù)據(jù)庫,本來對于word文檔我是用MSSQL的image字段類型,映射成binary,在程序中利用byte[]存取。但是到了oracle換成blob字段類型之后,可以正常存,但是取的時(shí)候一直是86字節(jié)長度,我換了oracle的好幾個(gè)驅(qū)動,都是不行,不知道是為什么。
          不是說oracle10.2的驅(qū)動已經(jīng)可以將blob映射成binary了嗎?

          posted @ 2008-01-22 16:56 姜海龍 閱讀(963) | 評論 (3)編輯 收藏

          FCKEditor2.4.2版本中并不支持列的合并,下面是原代碼:
           1FCKTableHandler.MergeCells = function()
           2{
           3    // Get all selected cells.
           4    var aCells = FCKTableHandler.GetSelectedCells() ;
           5
           6    // At least 2 cells must be selected.
           7    if ( aCells.length < 2 )
           8        return ;
           9
          10    // The merge can occour only if the selected cells are from the same row.
          11    if ( aCells[0].parentNode != aCells[aCells.length-1].parentNode )
          12        return ;
          13
          14    // Calculate the new colSpan for the first cell.
          15    var iColSpan = isNaN( aCells[0].colSpan ) ? 1 : aCells[0].colSpan ;
          16
          17    var sHtml = '' ;
          18    var oCellsContents = FCK.EditorDocument.createDocumentFragment() ;
          19
          20    for ( var i = aCells.length - 1 ; i >= 0 ; i-- )
          21    {
          22        var eCell = aCells[i] ;
          23
          24        // Move its contents to the document fragment.
          25        for ( var c = eCell.childNodes.length - 1 ; c >= 0 ; c-- )
          26        {
          27            var eChild = eCell.removeChild( eCell.childNodes[c] ) ;
          28
          29            if ( ( eChild.hasAttribute && eChild.hasAttribute('_moz_editor_bogus_node') ) || ( eChild.getAttribute && eChild.getAttribute( 'type', 2 ) == '_moz' ) )
          30                continue ;
          31
          32                oCellsContents.insertBefore( eChild, oCellsContents.firstChild ) ;
          33        }

          34
          35        if ( i > 0 )
          36        {
          37            // Accumulate the colspan of the cell.
          38            iColSpan += isNaN( eCell.colSpan ) ? 1 : eCell.colSpan ;
          39
          40            // Delete the cell.
          41            FCKTableHandler.DeleteCell( eCell ) ;
          42        }

          43    }

          44
          45    // Set the innerHTML of the remaining cell (the first one).
          46    aCells[0].colSpan = iColSpan ;
          47
          48    if ( FCKBrowserInfo.IsGecko && oCellsContents.childNodes.length == 0 )
          49        aCells[0].innerHTML = GECKO_BOGUS ;
          50    else
          51        aCells[0].appendChild( oCellsContents ) ;
          52}
          第10行代碼對列合并做了限制,下面是修改的代碼:
           1FCKTableHandler.MergeCells = function()
           2{
           3    // Get all selected cells.
           4    var aCells = FCKTableHandler.GetSelectedCells() ;
           5
           6    // At least 2 cells must be selected.
           7    if ( aCells.length < 2 )
           8        return ;
           9
          10    // The merge can occour only if the selected cells are from the same row.
          11    //if ( aCells[0].parentNode != aCells[aCells.length-1].parentNode ){
          12    //    alert("xx");
          13    //    return ;
          14    //}
          15    
          16    //*********************************************************************
          17    //在IE下合并單元格修改,主要針對上下單元格不能合并的問題。
          18    //姜海龍
          19    var iLen = aCells.length;
          20    var iStartCol = aCells[0].cellIndex ;
          21    var iStartRow = aCells[0].parentElement.rowIndex ;
          22    
          23    var iEndCol = aCells[iLen-1].cellIndex ;
          24    var iEndRow = aCells[iLen-1].parentElement.rowIndex ;
          25    
          26    var eCells = new Array();
          27    var j = 0;
          28    
          29    for(var i = 0; i < iLen; i++){
          30        if(aCells[i].cellIndex >= iStartCol && aCells[i].cellIndex <= iEndCol){
          31            eCells[j] = aCells[i];
          32            j++;
          33        }

          34    }

          35
          36    aCells[0].colSpan = iEndCol - iStartCol + 1;
          37    aCells[0].rowSpan = iEndRow - iStartRow + 1;
          38
          39    for (var i = 1; i < j; i++){
          40            eCells[i].parentElement.removeChild(eCells[i]);
          41    }

          42    
          43    //alert(aCells[0].rowSpan);
          44    //alert(aCells[0].parentElement.parentElement.innerHTML);
          45    //*********************************************************************
          46
          47
          48}
          該代碼未經(jīng)全面測試

          posted @ 2007-08-09 18:47 姜海龍 閱讀(882) | 評論 (0)編輯 收藏


          posts - 9, comments - 19, trackbacks - 0, articles - 1

          Copyright © 姜海龍

          主站蜘蛛池模板: 乌拉特中旗| 枝江市| 宜州市| 保山市| 前郭尔| 柳河县| 玉林市| 禄丰县| 特克斯县| 临潭县| 黄大仙区| 津南区| 青铜峡市| 利川市| 吴江市| 泌阳县| 永年县| 油尖旺区| 遂宁市| 吉林市| 民丰县| 诸暨市| 拉孜县| 宝应县| 丰台区| 五莲县| 绥中县| 英德市| 宜宾市| 航空| 根河市| 四子王旗| 岢岚县| 新闻| 栾城县| 丰原市| 察雅县| 乐业县| 定远县| 西宁市| 陕西省|