Hello SQL CLR experts,
We're using SQL Server 2008 R2 (French) and Visual Studio 2008. I'm trying to get a "simple" SQL CLR to work, which calls DriveInfo.GetDrive() and returns drive name, space available and total size into a SQL Table from the UDF GetDriveInfo() defined
below. I need help getting the code to work.
I realize that there is already an xp_fixeddrives extended stored procedure that returns only the available space. I want to return the Total Size of each drive, the volume name, etc.
I based my code on the article
http://www.sqlservercentral.com/articles/SQLCLR/65656/ but I want to use DriveInfo.GetDrive() instead of DirectoryInfo.GetFileSystemInfos(). I was successfully able to get the DirectoryInfo assembly from the article to work, but I am having trouble
getting my DriveInfo.GetDrive() adaptation to work.
In Visual Studio, I created a new C# SQL Server project and am using the following code:
View Complete Post