导出
if savedialog1.Execute then
 begin
  if FileExists(savedialog1.filename+'.xml') then
     begin
      if messagedlg(' 该文件已经存在,是否替换?',mtinformation,[mbYes, mbNo],0)=mrYes then
         adoquery1.SaveToFile(savedialog1.FileName+'.xml',pfXML);
     end
  else
         adoquery1.SaveToFile(savedialog1.FileName+'.xml',pfXML);
 end;导入(不过不是导入到数据库,只是通过感知控件显示数据)
if opendialog1.Execute then
 try
  adoquery1.LoadFromFile(opendialog1.filename);
 except
  showmessage('Error');
 end;