I will assume the jurisdiction is the United Kingdom.
An important distinction needs to be made in terms of who is the controller. Company A goes into administration, and continues to exist. It is a legal person and in respect of personal data it has been processing, it is the controller within the meaning of Art. 4(7) GDPR. Only the controller may make determinations as to the means and purposes of processing, and even then, any change in purpose must be communicated prior to commencing such processing under either Art. 13(3) or 14(4) depending on how the data were originally obtained.
If Company A, through or at the direction of an intermediary (or otherwise) transfers personal data in respect of which it is the controller, to Company B, then Company A must first communicate this fact to data subjects, along with all information required in connection with that new processing operation and purpose, and Company B will then be the controller as it will determine the means and purposes of processing thereafter, at which point it too will need to communicate with data subjects in accordance primarily with Art. 14, having obtained the personal data otherwise than from the data subject.
Purchasing a database implies transference of rights to the intellectual property and rights inherent in that database (ref. Copyright and Rights in Databases Regulations 1997), but you would expect any personal data it contains, especially in the case of a customer database, to be included in the transaction. However, failure to comply with data protection law in undertaking the disclosure/receipt of that data, would open both parties to litigation, and even if Company A is dissolved, there could still be cause of action against the receiver.
In my experience it is important not to think too rigidly about the requirements, and to be practical about how to meet them. For example, a notice of further processing from Company A and a privacy notice from Company B could be combined into the same communication, sent by or on behalf of Company A (by agency of the receiver) so that it is fair to Company A's customers and is more easily understood by them. This would of course be the first action after negotiating the purchase but before making the transfer, giving data subjects an opportunity to object (which is something the receiver might reasonably expect Company B to foot the bill for and which responsibility should be clearly delineated in any contract governing the sale).
Also remember that if the customers are private individuals, Company A will require explicit consent (see Art. 6(1)(a) and 7 GDPR) to target them with electronic direct marketing (e.g. email, SMS) under the Privacy and Electronic Communications (EC Directive) Regulations 2003 ("PECR"), since only Company A would benefit from the "course of a sale" exemption (Reg. 22(3)); this could not be transferred to Company B.
All of the above would be modified if the company was acquired, as in such a case Company A would continue to exist as a person and would continue to be the controller. The addition of Company B as a joint controller and eventual cessation of the existence of Company A, leaving Company B as the sole controller, would require fewer legal somersaults over a longer period. However, given that the company is in receivership, this would also mean taking on its liabilities and is unrealistic.
Finally, any transfer of personal data from Company A to Company B must take place while Company A continues to exist, as otherwise there is no controller to process (including disclose) the personal data, and its continued use, storage or disclosure by any other person would be unlawful, notwithstanding bona vacantia - but don't think you can talk to the Bona Vacantia Division of the Government Legal Department ("BVD") about data protection, nor to the ICO about BVD, because they don't have a clue (from first-hand experience).