Skip to main content
Skip table of contents

Statement: Direktes SQL

Input

HTML/XML
<Any element name>
   <statement resulttag="result element name" timezone="time zone"
    format="date format">
      <sql>  
         SQL statement
      </sql>
   </statement> 
</Any element name>

The following rules apply to each <statement/> element:


If you use characters within the SQL statement or for the values or data of the table columns that have a meaning in XML, mask the SQL statement with surrounding CDATA block, e.g. <![CDATA[ SELECT * FROM TABLE WHERE ID<1 ]]> or <rowset><row><name><!CDATA[ XML character “<“ in CDATA element]]></name></row></rowset>.

This ensures that the characters in the CDATA element are not interpreted as XML, but as data for the adapter.

Example
HTML/XML
<select>
   <statement resulttag="result" timezone="UTC" format="dd.MM.yyyy">
      <sql>  
         <![CDATA[SELECT * FROM JMS_USERS]]>
      </sql>
   </statement> 
</select>

Output

If the SQL statement was executed successfully, the database connection component will output an XML document with the following structure containing the query response as a string:

HTML/XML
<Data>
   <Result element name>
      <Feld1><!--Value--></Feld1>
      <Feldn><!--Value--></Feldn>
   </Result element name>
</Data>

For SELECT statements used to access database tables with column names that do not represent a valid XML name, synthetic element names are created within the result XML document, in order to ensure that the XML document is well-formed. 

JavaScript errors detected

Please note, these errors can depend on your browser setup.

If this problem persists, please contact our support.