The variable $DatabaseName used to be found in the config.php file in the main root directory of stock webERP installation This is now depriciated to a more prominent use of MultipleCompany which allows multiple companies to be dealt with.