Open
Description
Description
Stored procedures such as the one below have a return type Unit
when invoked.
Repro steps
- Create the stored procedure
CREATE PROCEDURE [Test]
AS
BEGIN
CREATE TABLE #_T (ID int NOT NULL, PRIMARY KEY (ID))
INSERT INTO #_T(ID)
VALUES (1)
SELECT 1
SELECT 2
SELECT 3
END
- Access the stored procedure using the type provider and inspect the result type
let value = Sql.GetDataContext().Procedures.Test.Invoke ()
// val value : Unit
Expected behavior
Ideally, I'd like to see each result set fully typed. In the worst case, I'd at least want to access the result sets in a dynamic fashion.
Actual behavior
The return type of the sproc is Unit
and there is no way to access the returned data.
Known workarounds
None that I know of other than getting rid of temporary tables :)
Related information
- Used database
MSSQL - SQLProvider version
1.0.37