...
Code Block |
---|
<retrieve> <statement> SELECT id, tenant, role, de$cription as description FROM roles </statement> </retrieve> |
Empty resultsets
If the results of a query are empty, the Database Connector returns an empty HTTP response. The XML Schema generated by the dbconnector requires at least 1 row (minOccurs=1). When the resultset has no rows, the connector sends an empty string, i.e. invalid XML instance. This is because the attribute emptyStringForEmptyResultSet="true" is configured by default.
logs a warning to that effect.You may notice the an error message similar to the image below in the debug console when testing your forms if no rows are returned by a query.
To
Stored Procedures
You can also execute stored procedures via the database connector. Here is an example of a mySql stored procedure.
...