refactored db_generic_query_view() to use sqlite3 API directly so that it can treat SQL errors as non-fatal.