Gurus.. Please help for Data file used space
I want to select the information for 'database used' and 'datafile used' spaces from the system tables. Which table or query can I use?

I updated statiscs, ran sp_updateusdage command but found the data displayed by sp_spaceused command without parameters lot differing from the data displayed from Enterprise Manager/View/Taskpad for the same database. Though this is simple in other databse vendors, it looks a bit difficult in SQLServer2000 which is known for user friendly.

For example I found fo a databse
Enterprise Manager shows database free: 3.13 MB

sp_spaceused shows:

Database: size: 4.00 MB, Unallocated: 2.48 MB

Reserved: 528 KB
Data: 144 KB
Index: 128 KB
Unused: 104 KB

In this case what should I believe like 3.13 MB or 2.48 MB?

What is the datafile used size here? Is it 144 KB? Then the Enterprise manager taskpad shows for datafile as free: 2.38 MB.

I am totally confused on these numbers.

Instead of executing commands to know the information, I am trying to write SQL statements to execute and store this data into a file and send me e-mail.

Can any one help please with this jugglary?