4,820
社区成员
发帖
与我相关
我的任务
分享
string sql = "select sales_no,amount from sales_master where cust_code='" + cust_id + "'";
da = new SqlDataAdapter(sql, con);
da.Fill(ds, "Sales");
for (int i = 0; i < ds.Tables["Sales"].Rows.Count; i++)
{
string sale_no = ds.Tables["Sales"].Rows[i]["sales_no"].ToString();
string subSql = "select payment_date,bank,cheque,m.recv_payment,m.non_payment,d.sales_no from payment_master m,payment_details d where m.payment_no=d.payment_no";
subSql = subSql + " and m.cust_id='" + cust_id + "' and (payment_date between '" + paymentDate_F + "' and '" + patmentDate_T + "') and approval='1'";
subSql = subSql + " and d.sales_no='" + sale_no + "' order by payment_date";
da = new SqlDataAdapter(subSql, con);
da.Fill(ds, "Payment");-----这里 报错 }