Recommendations for developing embedded SQL applications with XML and XQuery
If you are developing
embedded SQL applications that use XML and XQuery data, you must consider
if all the required data is available, and what type of data it is.
The following recommendations and restrictions apply to
using XML and XQuery within embedded SQL applications.
- Applications must access all XML data in the serialized string
format.
- You must represent all data, including numeric and date time data, in its serialized string format.
- Externalized XML data is limited to 2 GB.
- All cursors containing XML data are non-blocking (each fetch operation produces a database server request).
- Whenever character host variables contain serialized XML data, the application code page is assumed to be used as the encoding of the data and must match any internal encoding that exists in the data.
- You must specify a LOB data type as the base type for an XML host variable.
- The following recommendations and restrictions apply to static
SQL:
- Character and binary host variables cannot be used to retrieve
XML values from a
SELECT INTO
operation. - Where an XML data type is expected for input, the use of CHAR,
VARCHAR, CLOB, and BLOB host variables will be subject to an
XMLPARSE
operation with default whitespace handling characteristics('STRIP WHITESPACE')
. Any other non-XML host variable type will be rejected. - There is no support for static XQuery expressions; attempts to precompile an XQuery expression will fail with an error. You can only issue XQuery expressions through the XMLQUERY function.
- Character and binary host variables cannot be used to retrieve
XML values from a
- An XQuery expression can be dynamically issued by pre-pending the expression with the string "XQUERY".