读书人

System.Data.SqlClient.SqlException:

发布时间: 2012-05-31 12:19:24 作者: rapoo

System.Data.SqlClient.SqlException: 操作数类型冲突: date 与 int 不兼容
select * from CX_News where CXdate< shixiaoDate在数据库新建查询时没问题的


可是在后台里 string where = " chakancishu > CXdate and Is_show=1 ";
string fieldList = "CXID,CXContent,CXkeywords,CXtitle,CXdate,Is_show,order_by,img,faburen,shixiaoDate,chakancishu";
string orderField = "order_by";
bool orderBy = true;

DataRecordTable table = new CX_NewsBussiness().GetList(fieldList, orderField, orderBy, 1, 20, where.ToString());
gwCuXiao.DataSource = table.Table;
gwCuXiao.DataBind();
这样写就有问题了 报错

什么情况?string where 是条件

[解决办法]
Is_show是什么型

读书人网 >asp.net

热点推荐