I have an application that will be deployed onto at least 3 servers and the SQL Server 2000 DB will be named differently on each server. I have a routine that runs as part of the monthly closing procedures which creates a backup to file of the current database. This works fine when I know the name of the database, but is there a way to query for the name of the current database?

PS - This needs to be runnable by a DataReader/DataWriter, if possible.