Hi,
if you are executing your storedprocedure or function, it may required some parameter information to be passed. if you are not passing
SqlParameter
then it will throw such exception.
you have not given more information but please see below code, this may be your problem.
SqlConnection conn = null;
SqlDataReader rdr = null;
conn = new SqlConnection("YourConnectionString");
conn.Open();
SqlCommand cmd = new SqlCommand("StoredProcedureName", conn);
cmd.CommandType = CommandType.StoredProcedure;
rdr = cmd.ExecuteReader();
Please see above code. (Specially comment.)
Thanks
-Amit.