Stored Proc args

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

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!
 
baffled said:
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
 
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.
__________________________________
 
Back
Top