Possible Duplicate:
Retrieve column definition for stored procedure result set

I use the following SQL to get column names and types for a table or view:

DECLARE @viewname varchar (250);

select a.name as colname,b.name as typename 
from syscolumns a, systypes b -- GAH!
where a.id = object_id(@viewname) 
and a.xtype=b.xtype 
and b.name <> 'sysname'

How do I do something similar for the output columns of a stored procedure?

Edit
Report