hi.. today i fot one error. i am not able to understand why it is. i hope somebody will help me here
my method is
public UserFamilyInfoBO GetUserFamilyInfo(Int64 UserId)
{
try
{
DataSet Ds = new DataSet();
SqlCommand Cmd = new SqlCommand("GetUserFamilyInfo", Cn);
SqlDataAdapter Da = new SqlDataAdapter();
Da.SelectCommand = Cmd;
Cmd.Parameters.Add("@UserId", SqlDbType.BigInt).Value = UserId;
Cn.Open();
Da.Fill(Ds);
Cn.Close();
return SetBO(Ds.Tables[0]);
}
catch (Exception)
{
return null;
}
}
when Da.Fill(Ds) is executed it throws error "Procedure or function 'GetUserFamilyInfo' expects parameter '@UserId', which was not supplied."
i have already added parameter @UserId. and i am getting its value also when debugging. still i am getting the error.