602SQL Documentation Index  

Data Transfer between XML Files and ODBC Data Sources

Optimization of Queries during Data Export from ODBC to XML

Queries that collect data from databases for export to XML are optimized to minimize the database workload. When working over the ODBC database, two exceptional cases can arise when - due to optimization - an erroneous XML export could come into being. Both cases are related to relational interconnection of two database tables in the analytic DAD:

  1. If two consecutive records in the parent table contain the same values in all exported columns, then only one occurrence of the corresponding element comes to existence for these records; elements corresponding to all connected records from the child table will be inserted into it.
  2. If any record in the child table contains in all exported columns NULL values, then such record will not appear in XML at all.

If some of these cases happens, it is necessary to enable the Disable cursor optimization switch in the DAD parameters at page Export to XML in the XML Global properties dialog. Export will be slower, however, the result will be correct.

By contrast, the optimization can be left enabled if sufficient number of columns from the parent table are exported, so that it is possible to distinguish each two records, and if the records in the child table contain always some exported column that is not equal to NULL.