Libreoffice calc - Error accessing data source, can't open document

Earlier I made a calc document with some pivot tables and charts linked to a database I made. After that, I edited the database but did not rename it or move it. Now when I try to open the calc file, I get the error:

Error accessing data source ‘Database Name’: com.sun.star.container.NoSuchElementException: Database Name

How can I adjust things so that the calc file can once again find the database file? I am using Libreoffice version 6.2.3.2 on MacOS.

I have found a simple solution: Simply open a new empty spreadsheet and add the database back to the data sources.