Move the odbc_result construction before execution to act as a sentry