Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 SQL Server 2005 Forums
 Transact-SQL (2005)
 GetSpaceAvailable() returns -2147213389

Author  Topic 

prince0206
Starting Member

1 Post

Posted - 2009-01-28 : 01:52:46
Hello all,
When I use the above mentioned MS API it returns "-2147213389". Any clue why
is that throwing an error.

Thanks for your time
Prince

SwePeso
Patron Saint of Lost Yaks

30421 Posts

Posted - 2009-01-28 : 02:39:43
See http://msdn.microsoft.com/en-us/library/ms142612(SQL.90).aspx

The number indicates the free amount in kilobytes.
An INT can hold 2,147,483,647 as maximum value. Translate this to free space in gigabytes gives 2,048 GB, aka 2 terrabyte.

If your disk has more than 2 terrabyte free space, the returned value will use second compliment mathematics.



E 12°55'05.63"
N 56°04'39.26"
Go to Top of Page
   

- Advertisement -