In SQL 2000 you could use this statement to get the path to a database file
SELECT Filename FROM master.dbo.sysdatabases WHERE Name = 'MyDatabase'
but this won't return anything in SQL 2005. Any ideas how to retrieve the path to the database from any other SQL queries??
I've seen other links where they discuss the conversion from 2000 to 2005 and using "sys.databases" in place of "master.dbo.sysdatabases" but it doesn't contain the field 'Filename' which is the one I am after. Any help would be greatly appreciated.
Thanks,
BrianB