上面所有对象都已声明,忘了加一句,OleDbDataAdapter myadapter;

解决方案 »

  1.   

    仔细检查sql查询语句,把生成的字符串打出来,很可能使那里的错误。
      

  2.   

    select questionid,questionsubject,questionbody,recordtime,updatetime,username,telephone,email,isdone from forume_main where productid=1 order by recordtime,questionid应该没错的。很简单的语句呀。帮忙看有错吗? productid为数字型
      

  3.   

    where语句改为where productid='"+ productid +"'  order by recordtime,questionid";