Home All Groups Group Topic Archive Search About
Author
10 Nov 2005 7:58 PM
baffled
Is there an existing ADO.Net or Framework class or library for Sql Server
that would allow me to get a list of stored procedures AND the arguments,
default values, data types, etc...? 

I realize there are stored proces like sp_help & sp_procedure_params_rowset
that can provide that info at the db level, but I was hoping to not have to
reinvent the wheel.

Thanks in advance!

Author
10 Nov 2005 9:57 PM
David Browne
"baffled" <baff***@discussions.microsoft.com> wrote in message
news:51D40DCD-7987-495A-A0AE-7F087F2197A4@microsoft.com...
> Is there an existing ADO.Net or Framework class or library for Sql Server
> that would allow me to get a list of stored procedures AND the arguments,
> default values, data types, etc...?
>
> I realize there are stored proces like sp_help &
> sp_procedure_params_rowset
> that can provide that info at the db level, but I was hoping to not have
> to
> reinvent the wheel.
>
> Thanks in advance!

Nothing built-in to get the list of procedures, but a simple query like

  select * from information_schema.routines

will return you a list of all the procedures.  Then for each one you can use
SqlCommandBuilder.DeriveParameters to attach the correct parameter set for
each procedure.

David
Author
12 Nov 2005 1:29 AM
William (Bill) Vaughn
Sure. Cn.GetSchema should do the trick. It can return "Procedures" or
"ProcedureParameters" (2.0 Framework).

--
____________________________________
William (Bill) Vaughn
Author, Mentor, Consultant
Microsoft MVP
INETA Speaker
www.betav.com/blog/billva
www.betav.com
Please reply only to the newsgroup so that others can benefit.
This posting is provided "AS IS" with no warranties, and confers no rights.
__________________________________

Show quote
"baffled" <baff***@discussions.microsoft.com> wrote in message
news:51D40DCD-7987-495A-A0AE-7F087F2197A4@microsoft.com...
> Is there an existing ADO.Net or Framework class or library for Sql Server
> that would allow me to get a list of stored procedures AND the arguments,
> default values, data types, etc...?
>
> I realize there are stored proces like sp_help &
> sp_procedure_params_rowset
> that can provide that info at the db level, but I was hoping to not have
> to
> reinvent the wheel.
>
> Thanks in advance!

AddThis Social Bookmark Button