Fix insertion of simplehtml, html, and nl2br data types
Include an error message in the exception when a database query fails.