未处理 System.Data.SqlClient.SqlException Message=必须声明标量变量 "@orderID"。
publicDataSetFindOrderdetailbyID(cOrderInfoorder,stringtbName){SqlParameter[]prams={M...
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; 展开
{
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; 展开
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询