Added support for non-default database connections