tsql - SQL Server SET FMTONLY is deprecated. How do you get the structure of multiple resultsets? -
i understand after sql server 2012 set fmtonly deprecated. i've developed sophisticated code generation system analyzes results of stored procedure , generates c# code repository, data contracts, , business library. i'm utilizing set fmtonly analyze resultset(s) of stored procedures understand datacontract stored proc producing. contract gets generated interface , it's implementation. i'm able take stored procedure returning multiple recordsets , return data data contract client.
i cannot find replacement set fmtonly analyzes of resultsets stored proc. have insight on how can retrieve columns, data types, etc each , every resultset stored proc?
thanks help.
set fmtonly on flawed in considers select statements unconditional. replacements, sp_describe_first_result_set , sp_describe_first_result_set_for_object, return meta data first result set not work in situation. procs raise error in case of multiple results incompatible meta data.
i suggest retrieve meta data in c# code executing procs against newly built , deployed database, using sqldatareader methods retrieve meta-data. method handles dynamic sql well. case approach problematic if data contract varies depending on values passed, design issue anyway.
Comments
Post a Comment