"FROM tbDCusCardS cc
INNER JOIN tbMCardS mc ON cc.CardSNo = mc.CardSNo LEFT JOIN tbMAgent cca ON cc.AgentID = cca.AgentID LEFT JOIN tbMAgent mca ON mc.AgentID = mca.AgentID INNER JOIN tbPayType pt ON cc.PayTypeID = pt.PayTypeID INNER JOIN tbDPayCards dpc ON cc.CardSNo = dpc.CardSNo AND cc.AmtPeroid = dpc.Amt ";
SqlDataAdapter da = new SqlDataAdapter(sqlFO, Conn);
DataSet ds = new DataSet(); da.Fill(ds, "cc"); //ฟ้อง error ค่ะ
GridView1.DataSource = ds.Tables["cc"];
GridView1.DataBind();
Tag : .NET, Ms SQL Server 2005, Ms SQL Server 2008, C#