SqlDataSource Select Command
Hi all,
I am using SqlDataSource Class and when I'm adding the parameters for the stored procedure, it is throwing an exception that there is no parameters passed to parameters. I tried with adding the parameter as string value as well as the parameter object. My sample code to add the parameter is as follows. Can anybody tell me where I'm doing the mistake.
Parameter p = new Parameter("@UserType",TypeCode.Int32);
Parameter p1 = new Parameter("@ActiveStatus",TypeCode.Char);
p.DefaultValue = Convert.ToString(uType);
p1.DefaultValue = Convert.ToString(aStatus);
sdsFillGrid.SelectParameters.Add(p);
sdsFillGrid.SelectParameters.Add(p1);
Thanks and Regards,
Senthil Kumar M.
__________________
Thanks in advance.
Regards,
Senthil Kumar M.
|