Skip to content
Permalink
Browse files

Fix TotalSize case (Thx Crashyear https://github.com/crashyear)

  • Loading branch information...
gboge committed May 7, 2019
1 parent 8a7b97c commit 673f72cfce7c4119a5a9a1caae6ce55bb41fb75f
Showing with 4 additions and 4 deletions.
  1. +4 −4 KServer.cs
@@ -1316,10 +1316,10 @@ spaceused FLOAT
public static DataTable DashboardDisk(this smo.Server s)
{
smo.Database d = s.Databases["master"];
string sql = @"DECLARE @t table(drive VARCHAR(2), totalsize BIGINT DEFAULT 0, freespace BIGINT)
string sql = @"DECLARE @t table(drive VARCHAR(2), TotalSize BIGINT DEFAULT 0, freespace BIGINT)
INSERT INTO @t(drive, freespace) EXEC xp_fixeddrives
SELECT drive
, totalsize
, TotalSize
, freespace
FROM @t";
if (s.IsOleAutomationProcedureActivated())
@@ -1350,7 +1350,7 @@ EXEC master.dbo.xp_fixeddrives
IF @hr <> 0
EXEC sp_OAGetErrorInfo @odrive
UPDATE #drives
SET totalsize=@TotalSize/@MB
SET TotalSize=@TotalSize/@MB
WHERE drive=@drive
FETCH NEXT FROM dcur INTO @drive
END
@@ -1360,7 +1360,7 @@ DEALLOCATE dcur
IF @hr <> 0
EXEC sp_OAGetErrorInfo @fso
SELECT drive
, totalsize, freespace
, TotalSize, freespace
FROM #drives
ORDER BY drive
DROP TABLE #drives";

0 comments on commit 673f72c

Please sign in to comment.
You can’t perform that action at this time.