AvailabilityThis is an Orbeon Forms PE feature.ConfigurationThe Database Service Editor allows you to create simple SQL services. The idea is that you create a template for a SQL query or update, which runs against a Java datasource. This is the meaning of the fields:
<sql:param type="xs:string" select=""/>
The database service returns data in XML format as follows:
NOTE: All database column names are automatically converted to lowercase first! This means that the resulting response will contain all-lowercase XML element names. When using XPath expressions against the response, make sure to use lowercase as both XML and XPath are cases-sensitive.
<response> <row> <id>12</id> <first_name>John</first_name> <last_name>Smith</last_name> <phone_number>(555) 123 4567</phone_number> </row> <row> <id>34</id> <first_name>Alice</first_name> <last_name>Martin</last_name> <phone_number>(555) 987 6543</phone_number> </row></response>NOTE: It has been reported that using column aliases doesn't work. For example, in a SQL statements like:
The response might contain foo instead of the expected bar.As of 2011-08-16, we have committed a fix for this. Please let us know if aliases still don't work for you. |
