我声明了标量变量,但是还是提示“必须声明标量变量 "@orderID"。”
public DataSet FindOrderdetailbyID(cOrderInfo order, string tbName)
{
SqlParameter[] prams = {
MakeInParam("@orderid", SqlDbType.Int, 5,order.OrderID+"%"),
};
string ii = "select * from PUOrderDetails where OrderID = @orderID";
Open();
SqlDataAdapter da = new SqlDataAdapter(ii, con);
// 创建DataSet
DataSet ds = new DataSet();
//填充,第一个参数是要填充的dataset对象,第二个参数是填充dataset的datatabble
da.Fill(ds, "PUOrderDetails");
return ds;
------最佳解决方案--------------------"@orderid" => "@orderID"
------其他解决方案--------------------谢谢,的确是大小写的问题