但是,我正在尝试完成基于Web的应用程序的事务处理;过程或函数期望未提供的参数#2
Procedure or function 'completeTransaction' expects parameter '@dateTime', which was not supplied.
这里是功能的副本。
public static void completeTransaction(string storeCode, string employeeId, DateTime Date, string itemListNoId)
{
using (SqlConnection conn = new SqlConnection("Data Source = ; Initial Catalog =Business ; Integrated Security = true;"))
{
using (SqlCommand command = new SqlCommand("dbo.completeTransaction", conn))
{
command.CommandType = CommandType.StoredProcedure;
command.Parameters.Add("@storeCode", SqlDbType.Int).Value = storeCode;
command.Parameters.Add("@employeeId", SqlDbType.Int).Value = employeeId;
**command.Parameters.Add("@Date", SqlDbType.DateTime).Value = Date;**
command.Parameters.Add("@itemListNoId", SqlDbType.Int).Value = itemListNoId;
conn.Open();
command.ExecuteNonQuery();
conn.Close();
}
}
}
我的SQL表包含以下表和类型(商店代码,INT,员工,INT,日期,DATETIME,itemListNoId,INT)
前缀,请不要。 –
请阅读错误消息,请_do_。 –
哈哈。谢谢您的帮助。 – MasterP