 |
|
บรรทัดนี้ฟ้อง error ค่ะ da.Fill(ds, "cc");
ว่า Incorrect syntax near 'cc'. ค่ะ ตอนแรก ใส่ tbDCusCardS ก็ error ฟ้อง Incorrect syntax near 'cc'. เหมือนกันค่ะ
sqlFO = "SELECT mc.SaveDate,cc.CardSNo,cca.AgentCode ,cca.agentname,cc.Status,pt.Description,cc.AmtPeroid,dpc.CKNo, mca.agentname" +
"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#
|
|
 |
 |
 |
 |
Date :
2011-06-21 12:33:08 |
By :
mushroomsn |
View :
1106 |
Reply :
2 |
|
 |
 |
 |
 |
|
|
|
 |