こんにちはIVEはこのエラーを得たが、theresのエラーCS0029:暗黙的に「INT」にタイプ「string」を変換し、私が実行しようとしたとき
説明することはできません:エラーは、このサービスを提供するために必要なリソースのコンパイル中に発生しました要求。以下の特定のエラーの詳細を確認し、ソースコードを適切に変更してください。
コンパイラエラーメッセージ:CS0029:暗黙的に「INT」にタイプ「string」を変換できません、あなたのパラメータの
cmd.Parameters.AddWithValue("@pDateOfDelivery", po.dateOfDelivery);
cmd.Parameters.AddWithValue("@pStatus", po.status);
cmd.Parameters.AddWithValue("@pDeliveryTiming", po.deliveryTiming);
cmd.Parameters.AddWithValue("@pCoID", po.coID);
try
{
conn.Open();
int iResult = cmd.ExecuteNonQuery();
if (iResult > 0)
{
result = "You have successfully updated the DeliveryOrder!";
}
else
{
result = "You have encountered an error. Please try again.";
}
}
catch (Exception)
{
result = "You have encountered an error. Please try again";
}
finally
{
cmd.Dispose();
conn.Close();
}
}
}
return result;
}
どのような行?... – Gusman
あなたのメソッドの定義を教えてください。私はそれがintを返していると言いますが、あなたは文字列である 'result'を返します。 – Rob