(mm**********@gmail.com) writes:
How to find out what type of the data procedure in MSSQL 2005
returns?
Using inquiry about sample.
Example:
SELECT paramtypes FROM sysprocedures;
Result:
integer
row
clob
array list
array
.....
There is not really any good way to do this. One reson is that in theory
the same procedure could return a differently structured result set
every time.
The method that is used by several client APIs is to run SET FMTONLY ON
prior to running the procedure. In this mode, SQL Server just sifts
through the queries, and returns metadata information, but it does not
execute the queries. There are a lot of problems with this scheme. For
instance, temp tables are not created in this mode, which can lead
to error messages about missing tables.
--
Erland Sommarskog, SQL Server MVP,
es****@sommarskog.se
Links for SQL Server Books Online:
SQL 2008:
http://msdn.microsoft.com/en-us/sqlserver/cc514207.aspx
SQL 2005:
http://msdn.microsoft.com/en-us/sqlserver/bb895970.aspx
SQL 2000:
http://www.microsoft.com/sql/prodinf...ons/books.mspx