If I have an instance of Microsoft.SqlServer.TransactSql.ScriptDom.FunctionCall
, how do I get the data type of the value that will be returned by the function?
Asked
Active
Viewed 123 times
0

adam0101
- 29,096
- 21
- 96
- 174
-
doesn't the `Microsoft.SqlServer.TransactSql.ScriptDom.FunctionCall have a GetType method` [MSDN FunctionCall Class](https://msdn.microsoft.com/en-us/library/microsoft.sqlserver.transactsql.scriptdom.functioncall.aspx) – MethodMan Apr 24 '15 at 20:51
-
@MethodMan, that returns the .Net type of the `FunctionCall` object itself. I need the data type of the return value of the function that the `FunctionCall` represents. – adam0101 Apr 24 '15 at 21:09
-
I don't think that the ScriptDom can tell you that. However using the Dac strongly typed model, you should be able to query it. Check out ScalarFunction.ReturnType here: https://github.com/Microsoft/DACExtensions/blob/master/DacFxStronglyTypedModel/model.cs – Kevin Cunnane Apr 26 '15 at 19:29