Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 SQL Server 2000 Forums
 SQL Server Development (2000)
 Stored Procedure Result Set Column Definitons

Author  Topic 

AskSQLTeam
Ask SQLTeam Question

0 Posts

Posted - 2002-05-13 : 11:16:09
Eric writes "In SQL Server 2000, is there a way to get the column definitions for the result set of a stored procedure without executing the stored procedure?

sp_sproc_columns looks like it will do it, but the documentation states, "In SQL Server, only the column information about input and output parameters for the stored procedure are returned."

Any help would be greatly appreciated.

Thanks,
Eric"

robvolk
Most Valuable Yak

15732 Posts

Posted - 2002-05-13 : 11:21:50
Unfortunately no. The only idea I have is to somehow parse out the text that makes up the stored procedure (it's stored in the syscomments table) but that is kinda haphazard, and if you use an IF...ELSE block to run completely different blocks of SQL it won't work at all. ADO won't help either, it can return the parameters for a sproc but not the columns.

Go to Top of Page
   

- Advertisement -