Move try/raise to function execute_sql
For database consitency, delete marker before updating dynpoi_class