日期:2014-05-19  浏览次数:21004 次

多步 OLE DB 操作产生错误。如果可能,请检查每个 OLE DB 状态值。
OleDbConnection   MyConn   =   new   OleDbConnection( "Provider=Microsoft.Jet.OLEDB.4.0;   "+connectionString);
                //MyConn.Open();
                OleDbDataAdapter   MyAdapter   =   new   OleDbDataAdapter();
                OleDbCommand   MyCmd   =   new   OleDbCommand(dlstr,   MyConn);
                MyAdapter.SelectCommand   =   MyCmd;
                DataSet   myDataSet   =   new   DataSet();
                int   startdata   =   datasize   *   (Int32.Parse(pagenum)   -   1);
                MyAdapter.Fill(myDataSet,   startdata,   datasize,   "result ");


以上是我的代码,我看了别的帖子,说这个错误是因为字段不够长,可是我没有理解,什么字段呀?

------解决方案--------------------
dlstr打印出来
------解决方案--------------------
"select para_cd,para_drpt,amt_vlu,para_typ,null as apply_dt from sysconf where para_typ= '83 ' and subcd_flg= '0 ' union select incentive_cd as para_cd,incentive_drpt as para_drpt,apply_point as amt_vlu, ' ' as para_typ,apply_dt from icapplypoint where ic_num= ' " + Session[ "ic_num "].ToString() + " ' ";
===================================================
上下的5个字段数据类型都兼容么?
para_cd,para_drpt,amt_vlu,para_typ,null as apply_dt
incentive_cd as para_cd,incentive_drpt as para_drpt,apply_point as amt_vlu, ' ' as para_typ,apply_dt