Click here to Skip to main content
15,895,746 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
C#
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)
        {
        }
}




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
Posted
Updated 14-Nov-11 1:08am
v3

 
Share this answer
 
Comments
ashok_89 14-Nov-11 7:08am    
but all my parameters are correct
Pandya Anil 14-Nov-11 7:13am    
parameters in the sense, name of the parameter, sequence of the parameters.. and number of parameters of the procedure... kindly verify for typos..
after we find we generally say... this typo took my 2 hours :)
ashok_89 16-Nov-11 3:56am    
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
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
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900