完整信息无法从数据库查询到数据表asp.net c#

时间:2014-02-10 08:27:37

标签: c# mysql asp.net

当我在MySql数据库中运行查询时,我得到了以下结果

08/03/2014,07/03/2014,06/03/2014,05/03/2014,04/03/2014,03/03/2014,02/03/2014,01/03/2014,28/02/2014,27/02/2014,26/02/2014,25/02/2014,24/02/2014,23/02/2014,22/02/2014,21/02/2014,20/02/2014,19/02/2014,18/02/2014,17/02/2014,16/02/2014,15/02/2014,14/02/2014,13/02/2014,12/02/2014,11/02/2014

但是当我使用相同的查询并尝试填充DataTable中的asp.net c#时,只有256字符如下所示

08/03/2014,07/03/2014,06/03/2014,05/03/2014,04/03/2014,03/03/2014,02/03/2014,01/03/2014,28/02/2014,27/02/2014,26/02/2014,25/02/2014,24/02/2014,23/02/2014,22/02/2014,21/02/2014,20/02/2014,19/02/2014,18/02/2014,17/02/2014,16/02/2014,15/02/2014,14/02/2014,13/

任何帮助将不胜感激。问题是什么引起的?以及如何克服它?

这是我的查询,我使用此查询来填充DataTable

SELECT DISTINCT  GROUP_CONCAT(DATE_FORMAT(p.PubDate, '%d/%m/%Y') ORDER BY DATE_FORMAT(PubDate, '%Y%m%d') DESC SEPARATOR ',' ) AS `Column` FROM 

 (SELECT `ID`, COUNT(DISTINCT `BookUnitID`) AS `I_UnitID` 
 FROM `publishdates` 
 WHERE `IsActive`='T' 
 GROUP BY `ID`) b

 LEFT JOIN 
 (SELECT `ID`,`PubDate`, COUNT(DISTINCT `BookUnitID`) AS `I_UnitID` 
 FROM `publishdates` 
 WHERE `IsActive`='T' 
 GROUP BY `ID`, PubDate) p

 ON p.I_UnitID = b.I_UnitID AND b.ID=p.ID 
 INNER JOIN matter AS m ON b.ID=m.ID
 WHERE p.ID IS NOT NULL AND m.CreatedBy='12130' AND p.PubDate>CURDATE()
 GROUP BY p.ID ORDER BY p.ID DESC LIMIT 0,6

0 个答案:

没有答案