I am trying to call master..xp_fixeddrives from an application using .NET Entity Framework, so I need the results to be parsable. I am looking to call master..xp_fixeddrives, but for EF, it must be in a view or Stored Procedure.
I can't figure out the syntax to create this. I tried defining a view, and tried removing select and exec, but without luck. How can I do this?
create view zzz
as select exec 'master..xp_fixeddrives';
Also tried creating it as a stored procedure, but the SP doesn't actually return anything becuase it doesn't have a select statement.
CREATE PROCEDURE GetHardDriveFreeSpaceInMegabytes
AS
BEGIN
-- SET NOCOUNT ON added to prevent extra result sets from
-- interfering with SELECT statements.
SET NOCOUNT ON;
EXEC master..xp_fixeddrives
END
GO
Simply calling the following doesn't work, either
select *
from master..xp_fixeddrives