zoukankan      html  css  js  c++  java
  • Web大文件上传控件-asp.net-bug修复-Xproer.HttpUploader6.2

    版权所有 2009-2016荆门泽优软件有限公司

    保留所有权利

    官方网站:http://www.ncmem.com/

    产品首页:http://www.ncmem.com/webapp/up6.2/index.asp

    在线演示:http://www.ncmem.com/products/up6.2/index.htm

    产品介绍:http://www.cnblogs.com/xproer/archive/2012/10/26/2741264.html

    升级日志:http://www.cnblogs.com/xproer/archive/2012/10/26/2741268.html

    开发文档:ASP,PHP,JSP,ASP.NET,

    资源下载:cab安装包(x86),cab安装包(x64),crx安装包,crx(nat)安装,xpi安装包,exe安装包,开发文档,VC运行库,Discuz!X2插件下载,

    示例下载(.NET)SQL2005示例,

    示例下载(JSP)Sql2005示例,MySQL示例,Oracle示例,

    示例下载(PHP)MySQL示例

    联系信箱:1085617561@qq.com

    联系QQ1085617561

     

    修复文件夹中文件数过多导致数组超界的问题

    修复前错误截图:

    f624fe6b-b350-4125-b631-6b590ea8c772

     

     

    fd_appender.cs

    修改前:

    ad99bf0c-1d4b-44a0-b91c-313569d80a38

     

    修改后:

    f796b753-4872-43f3-9b94-6d107ee9a163

     

    代码:

    void make_ids()

    {

        this.cmd = db.GetCommandStored("fd_files_add_batch");

        db.AddInt(ref cmd, "@f_count", this.m_root.files.Count + 1);

        db.AddInt(ref cmd, "@fd_count", this.m_root.folders.Count + 1);

        cmd.Connection.Open();

        var r = cmd.ExecuteReader();

        List<string> id_files = new List<string>();

        List<string> id_fds = new List<string>();

        while(r.Read())

        {

            if (r.GetBoolean(0)) id_files.Add(r.GetInt32(1).ToString());

            else id_fds.Add(r.GetInt32(1).ToString());

        }

        r.Close();

        this.f_ids = id_files.ToArray();

        this.fd_ids = id_fds.ToArray();

    }

     

    存储过程:

    fd_files_add_batch.sql

    修改前:

    dea36630-f214-44ed-a183-598419c0705a

     

    修改后:

    caea909d-458c-4ae0-99cd-09b34b83245d

    代码:

    USE [HttpUploader6]

    GO

    /****** 对象:  StoredProcedure [dbo].[fd_add_batch]    脚本日期: 07/28/2016 17:42:12 ******/

    SET ANSI_NULLS ON

    GO

    SET QUOTED_IDENTIFIER ON

    GO

     

    -- =============================================

    -- Author:         zysoft

    -- Create date: 2016-08-04

    -- 更新 2016-09-06 使用临时表解决ID数量过多的问题。

    -- Description:    批量分配文件夹ID和文件ID,提供给上传文件夹使用,在初始化时使用

    -- =============================================

    CREATE PROCEDURE [dbo].[fd_files_add_batch]   

          @f_count int --文件总数,要单独增加一个文件夹

         ,@fd_count int     --文件夹总数

    AS

    BEGIN

         -- SET NOCOUNT ON added to prevent extra result sets from

         -- interfering with SELECT statements.

         SET NOCOUNT ON;

        

         --使用临时表存储ID

         create table #tb_ids(t_file bit,t_id int)

     

        DECLARE @i int;

         set @i = 0;

     

         /*批量添加文件夹*/

         while @i < @fd_count

         begin

             insert into up6_folders(fd_pid) values(0);

             insert into #tb_ids values(0,@@IDENTITY)

             set @i = @i + 1;

         end

     

         /*批量添加文件*/

         set @i = 0;

         while @i < @f_count

         begin

             insert into up6_files(f_pid) values(0)

             insert into #tb_ids values(1,@@IDENTITY)

             set @i = @i+1

         end

        

         --清除,

         select * from #tb_ids;

    END

     

    修复后上传文件数量多的文件夹效果:

    c2a53470-2718-4aa4-8320-793414ef731e

     

  • 相关阅读:
    HDU 1251 统计难题 字符匹配
    mac 安装mysql
    ubuntu git 下添加 ssh
    mac下virtualenv使用
    git-ssh配置和使用
    在PythonAnyWhere上部署Django项目
    ImportError: No module named PIL
    mysql 命令行操作
    ubuntu安装ssh
    常用git命令
  • 原文地址:https://www.cnblogs.com/xproer/p/5845023.html
Copyright © 2011-2022 走看看