Add database error, set all errors to unknown for now.
Changed missed places for DB_TYPE_UNKNOWN => DB_TYPE_EMPTY
Indentation fix
Add missing parameters to create/update/delete. Fix usage of clause value.