* modified the sql factory and null sql to fail gracefully on db problems