网站运行时错误

时间:2014-05-05 09:26:37

标签: mysql asp.net

在网站上生成报告时,我遇到了运行时错误。所以,为了解决这个问题,我连接到本地phpmyadmin mysql数据库并进行了调试。我没有得到任何错误。报告生成成功。然后,我连接到网站的主数据库并进行调试。即使是现在我也没有收到任何错误。该报告成功生成。谁能说我可能是什么问题?我使用asp.net作为前端。

编辑:

gvWorkProcess.DataSource = null;
if (chbStatus.Checked)
{
     dTable = getConn.GetAdapterDatatable("SELECT  (select umName from usermaster where umCode=stResource) as Resource,  (select umName from usermaster where umCode=stAssign) as Assigned_To,  (select csname from customermaster where csCode=stCust)  as Customer,  (Select pjName from project where pjCode=stProject) as Project,  stName as Name,  stRemarks as Remarks,  stSev as Severity,  DATE_FORMAT(stEstFrom, '%d/%m/%Y') as Est_From,  DATE_FORMAT(stEstTo, '%d/%m/%Y') as Est_To, stEstHrs as Est_Hrs,  DATE_FORMAT(stActFrom, '%d/%m/%Y') as Act_From,  DATE_FORMAT(stActTo, '%d/%m/%Y') as Act_To,  stActHrs as Act_Hrs,  stStatus as Status FROM  subtaskmaster left join timesheet on tsTask=stCode WHERE  tsStatus=100 and (stResource = '" + cUser[nindex] + "' or 'ALL'='" + cUser[nindex] + "') and (stAssign= '" + cUsers[nindexs] + "' or 'ALL'='" + cUsers[nindexs] + "') AND stActTo >=  '" + cFDate + "' AND  stActTo <=  '" + cTDate + "' and stStatus='" + 100 + "' and (stProject!='" + cNoEst + "'  or 'ALL'='" + cNoEst + "')", Global.conStrDatabase);
}
else
{
     dTable = getConn.GetAdapterDatatable("SELECT  (select umName from usermaster where umCode=stResource) as Resource,  (select umName from usermaster where umCode=stAssign) as Assigned_To,  (select csname from customermaster where csCode=stCust)  as Customer,  (Select pjName from project where pjCode=stProject) as Project,  stName as Name,  stRemarks as Remarks,  stSev as Severity,  DATE_FORMAT(stEstFrom, '%d/%m/%Y') as Est_From,  DATE_FORMAT(stEstTo, '%d/%m/%Y') as Est_To, stEstHrs as Est_Hrs,  DATE_FORMAT(stActFrom, '%d/%m/%Y') as Act_From,  DATE_FORMAT(stActTo, '%d/%m/%Y') as Act_To,  stActHrs as Act_Hrs,  stStatus as Status FROM  subtaskmaster WHERE (stResource = '" + cUser[nindex] + "' or 'ALL'='" + cUser[nindex] + "') and (stAssign= '" + cUsers[nindexs] + "' or 'ALL'='" + cUsers[nindexs] + "') AND  stActTo >=  '" + cFDate + "' AND  stActTo <=  '" + cTDate + "' and (stProject!='" + cNoEst + "'  or 'ALL'='" + cNoEst + "')", Global.conStrDatabase);
}
dTabPrt = dTable;
gvWorkProcess.DataSource = dTable;
gvWorkProcess.DataBind();

在网站中,报告成功生成第二个查询。但不是第一次查询。

0 个答案:

没有答案