为什么我要获取参数值不等于计数值 [英] why iam getting parameter value not equal to count value

查看:67
本文介绍了为什么我要获取参数值不等于计数值的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

clickevent(...)
{
try


        {
            DateTime createddate = DateTime.Now;
            String superuserid1, basestationname1;
            superuserid1 = Superuserid.SelectedValue;
            basestationname1 = BaseStationName.SelectedValue;
            String employeename = textbox1.Text.Trim();
            ConnectionCls conObj = new ConnectionCls();
            string conStr = conObj.getConnectionString();
            object[] ob = new object[4];
            ob[0] = employeename;
            ob[1] = basestationname1;
            ob[2] = superuserid1;
            ob[3] = createddate;
            DataSet dsEmp = new DataSet();
            dsEmp = InfoTrackDataAccess.DataAccess.ExecuteDataset(conStr, "employeegeofence", ob);//25
            String strMsg = Utility.DeleteMaster(dsEmp, 0);

            if (strMsg.StartsWith("Success"))
            {
                Label1.Visible = true;
                Label1.Text = "success";
            }
            else
            {

            }
        }

        catch (Exception ex)
        {
        }
}





这里的问题是第25行iam收到异常"Parameter count does not match Parameter Value count.",我的数据库表有四个字段,存储过程工作正常,我检查了花括号都正确.行"InfoTrackDataAccess.DataAccess.ExecuteDataset"与其他存储一起工作程序只能在其显示异常的情况下才能正常工作,textboxdropdowns中的值也可以正确获取.帮助我离开公司,坐在公司里苦苦挣扎





the issue here is in line 25 iam getting an exception "Parameter count does not match Parameter Value count." , my database table has four feilds,the stored procedure is working fine, i checked the braces all are correct .the line "InfoTrackDataAccess.DataAccess.ExecuteDataset" works with other stored procedures its working fine only in this its showing exception,the values are also retreiving correctly in textbox,dropdowns. help me out iam sitting in the company and struggling due to this one

推荐答案

问题在此处与解决方案讨论:

http://stackoverflow.com/questions/2686090/parameter-count-不匹配参数值计数 [ ^ ]
Issue discussed here with solution:

http://stackoverflow.com/questions/2686090/parameter-count-does-not-match-parameter-value-count[^]


实际上是在检查了是否关闭并打开Visual Studio IDE的值后才解决的.以前,如果我们犯了一个错误,那么cookie中也存在相同的内容,所以我遇到了这个问题
actually after checking the value if we close and open the visual studio ide it gets solved. previously if we had made an mistake the same resides in the cookies so i got this problem


这篇关于为什么我要获取参数值不等于计数值的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆