标签:
----------------
sql错误
在webservice中使用了这样的语句导致出错(因为要在后面使用CopImportTime列):
string sCourtName = myDataTable.Rows[i]["CopZDMC"].ToString();
string sSql = string.Format("select top 1 CopCGL,CONVERT(varchar(100), CopImportTime, 23) From TC_CopyRate where CopZDMC=‘{0}‘ order by CopImportTime desc", sCourtName);
改为以下后正确:
string sCourtName = myDataTable.Rows[i]["CopZDMC"].ToString();
string sSql = string.Format("select top 1 CopCGL,CONVERT(varchar(100), CopImportTime, 23) as CopImportTime From TC_CopyRate where CopZDMC=‘{0}‘ order by CopImportTime desc", sCourtName);
标签:
原文地址:http://www.cnblogs.com/gaotaozhaolei/p/4206698.html