首页 诗词 字典 板报 句子 名言 友答 励志 学校 网站地图
当前位置: 首页 > 教程频道 > 网站开发 > asp.net >

System.Data.SqlClient.SqlException: 操作数类型冲突: date 与 int 不兼容解决办法

2012-05-31 
System.Data.SqlClient.SqlException: 操作数类型冲突: date 与 int 不兼容select * from CX_News where C

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是什么類型

热点排行