解决方案 »

  1.   

     [MethodImpl(MethodImplOptions.Synchronized)]
    public static int execute_simple(string sql,SqlConnection conn)
      

  2.   

    回复bo1112002:我的是单服务器,你的是用多情程是多用户的意思吗?还有 [MethodImpl(MethodImplOptions.Synchronized)]是什么意思?
      

  3.   

    日pv18000这个不算是高访问量。问题极有可能出现在本身的业务逻辑的bug.而和并发没关系。你自己都说了操作时间相差两小时。哪有横跨两小时的并发操作?而且你的数据层方法传入的是sql, 这意味着从业务逻辑传入的也是 sql 语句,这根本没体现出分层的特点。
      

  4.   

    回复bwangel 连着一个星期访问量少的时候,一个数据都没有混乱,又这难以解释,第二个星期一,访问量突然大了,到星期一晚上我发现出现了两条混乱数据,访问量大的时候才出错,我是可以肯定的,
      

  5.   

    貌似静态的全局变量会发生这种情况~~~~因为我以前也是这样.....本来是A用户下创建的东西    在没有提交的时候  我用B用户登录
    然后再提交A用户的那个界面.....不是同一浏览器  然后数据库出现就是B用户的东西了       只因一个Static  int   Uid......
      

  6.   

    回复bwangel 
    我的业务逻辑层都是简单的逻辑,using System;
    using System.Collections.Generic;
    using System.Linq;
    using System.Text;
    using System.Data;
    using System.Data.SqlClient;
    using DAL;
    namespace BLL
    {
        public class receivedlist_bll
        {
            public DataTable getexcomitem()
            {
                receivedlist_dal receivelistdal = new receivedlist_dal();
                return receivelistdal.getexcomitem();
            }        public DataTable getcutorderitems(string weblogin)
            {
                receivedlist_dal receivelistdal = new receivedlist_dal();
                return receivelistdal.getcutorderitems(weblogin);
            }
            public bool getoneitem(string tmpkey)
            {
                receivedlist_dal sysdal = new receivedlist_dal();
                return sysdal.getoneitem(tmpkey);
            }
            public string getoneitem2(string tmpkey)
            {
                receivedlist_dal sysdal = new receivedlist_dal();
                return sysdal.getoneitem2(tmpkey);
            }
            public bool getoneitem3(string tmpkey)
            {
                receivedlist_dal sysdal = new receivedlist_dal();
                return sysdal.getoneitem3(tmpkey);
            }
            public int retreccount(string weblogin)
            {
                receivedlist_dal receivelistdal = new receivedlist_dal();
                return receivelistdal.retreccount(weblogin);
            }
            public DataTable getdataset_curentpage(string weblogin, int pageIndex, int pageSize)
            {
                receivedlist_dal rettable = new receivedlist_dal();
                return rettable.getdataset_curentpage(weblogin, pageIndex, pageSize);
            }
            public bool addexpress(string tmpexnum,string tmpexcom,string weblogin)
            {
                receivedlist_dal dal = new receivedlist_dal();
                return dal.addexpress(tmpexnum, tmpexcom,weblogin);
            }
            public bool delorderitem(int itemid)
            {
                receivedlist_dal dal = new receivedlist_dal();
                return dal.delorderitem(itemid);
            }
            public bool updateitem(string cutre,int itemid)
            {
                receivedlist_dal dal = new receivedlist_dal();
                return dal.updateitem(cutre,itemid);
            }
            
        }
    }