0
我用於與錫數據庫類型塔提供0,但它與異常返回過程或函數「usp_ClientHistoryItem」預計參數「@iReturnTripRef」,但未提供
過程或函數「usp_ClientHistoryItem」預計參數 '@iTripRef',未提供。
using (SqlCommand cmd = new SqlCommand("dbo.usp_ClientHistoryItem", conn))
{
cmd.CommandType = CommandType.StoredProcedure;
SqlParameter parameterID = new SqlParameter("@ID", oReservation.Id);
parameterID.Direction = ParameterDirection.Output;
cmd.Parameters.Add(parameterID);
cmd.Parameters.Add(new SqlParameter("@PhoneNo", oReservation.ClientPhone));
cmd.Parameters.Add(new SqlParameter("@UserId", oReservation.UserID));
cmd.Parameters.Add(new SqlParameter("@iTripRef", 0));
cmd.Parameters.Add(new SqlParameter("@TestId", oReservation.TestId));
cmd.Parameters.Add(new SqlParameter("@StartDate", oReservation.StartDate));
cmd.ExecuteNonQuery();
returnValue = Convert.ToInt32(cmd.Parameters["@ID"].Value);
return returnValue;
}