I use this script to retrieve database space information.
DECLARE @TempFiles TABLE (
[Name] [nvarchar](128) NULL,
[DatabaseID] [int] NULL,
[Type] [nvarchar](60) NULL,
[State] [nvarchar](60) NULL,
[SizeMB] [float] NULL,
[SizeUsedMB] [float] NULL,
[MaxSizeMB] [float] NULL,
[AutoGrowSize] [float] NULL,
[PercentGrowth] [bit]...