Recent

Author Topic: lazdbexport.TSimpleXMLExporter - example needed  (Read 1393 times)

tudi_x

  • Hero Member
  • *****
  • Posts: 538
lazdbexport.TSimpleXMLExporter - example needed
« on: May 10, 2016, 11:57:55 pm »
Hi!
Please advise if an example of XML export exists, I have no rows exported in the below, please help with what I am missing.
I looked as per the wiki at http://wiki.freepascal.org/fpXMLXSDExport and was not able to find an example.

Thank you

Code: Pascal  [Select][+][-]
  1. e_xml := TSimpleXMLExporter.Create(nil);
  2.  
  3.     if e_xml is TCustomFileExporter then
  4.     begin
  5.       e_xml.Dataset := Source;
  6.       e_xml.ExportFields.AddField('ID');
  7.       e_xml.FileName := 'xxxxxxxxxx.xml';
  8.       writeln('Rows: ' + IntToStr(e_xml.Execute));
  9.     end;
  10.  
  11.     e_xml.Free;  
  12.  
Lazarus 2.0.2 64b on Debian LXDE 10

engkin

  • Hero Member
  • *****
  • Posts: 2513
Re: lazdbexport.TSimpleXMLExporter - example needed
« Reply #1 on: May 11, 2016, 04:23:18 am »
I don't see a problem in your code. I have a strong feeling that you are running it from within Lazarus. Run your app from its folder directly.

 

TinyPortal © 2005-2018