if application.MessageBox('是否从村务里调用数据!','更新提示!',mb_yesno)=idyes then
       begin           datam.ADOQ_update.SQL.Text :='select * from ry_ryda';
           datam.ADOQ_update.open ;
           datam.ADOQ_update.SaveToFile('cw.xml',pfXML) ;
           adoquery1.LoadFromFile('cw.xml');
           
      end;如果另外一个事件是这样写
 adoquery1.DataSource :=nil; //就是同一个adoquery1.根据不同的选择想载入不        同数据源
  adoquery1.Connection :=datam.ADOConnection1 ;
  adoquery1.SQL.Text :='select xm,xb,csrq,mz,rybh,dzbh,jg,dwsx,sshy,grsf,zwmc,zwjb,jszc,gzsj,xmmr,fzlx from d_sqrxx where state='''+'1'+'''';
  datasource1.Dataset:=adoquery1;
  adoquery1.open;  
//包错。loadfromfile好象跟连接数据库有冲突