MSDN
Thu May 04 15:49:33 CDT 2006
Forgot if SqlParameter[] sqlParameters = new SqlParameter[x]; is zero
based or not??
where x = 1 or 2 ??
SqlParameter[] sqlParameters = new SqlParameter[1];
Also it should tell you if the number of Parameters are correct for the
Stored procedure "GetEmployee". you are not getting that error.
SA
"Miha Markic [MVP C#]" <miha at rthand com> wrote in message
news:uJAeyJ7bGHA.4932@TK2MSFTNGP03.phx.gbl...
> Perhaps SqlHelper.ExecuteDataset expects more parameters. Or less.
>
> --
> Miha Markic [MVP C#]
> RightHand .NET consulting & development www.rthand.com
> Blog:
http://cs.rthand.com/blogs/blog_with_righthand/
>
> "C" <C@discussions.microsoft.com> wrote in message
> news:8AC18673-560C-48CF-A1C6-8029A3D03097@microsoft.com...
>> When I use below code I get "Parameter count does not match Parameter
>> Value
>> count".
>>
>> Anyone know why I get this?
>>
>> SqlParameter[] sqlParameters = new SqlParameter[2];
>>
>> sqlParameters[0] = new SqlParameter("@NTUserName", SqlDbType.VarChar);
>> sqlParameters[0].Value = ntUserName;
>>
>> sqlParameters[1] = new SqlParameter("@FlgActive", SqlDbType.Bit);
>> sqlParameters[1].Value = 0;
>>
>> DataSet dsEmployee = null;
>> dsEmployee =
>> SqlHelper.ExecuteDataset(Configuration.GetAppConfigSetting("SQLConnect"),
>> "GetEmployee", sqlParameters);
>>
>
>