added a way to test the SQL connection before execution
forced application to validate connction before running a get trades