Home > Archive > MS SQL Server Tools > March 2006 > SMO









You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

 

Author SMO
Lee

2006-03-14, 1:23 pm

Using SMO for .NET 2.0 how can I determine...
If a stored procedure's parameter is Input only, or input/output?
Jasper Smith

2006-03-14, 8:24 pm

You can use the IsOutputParameter property of the StoredProcedureParam
eter
object e.g.

Server svr = new Server();
StoredProcedure p =
svr.Databases["master"].StoredProcedures["sp_dbcmptlevel", "dbo"];

foreach (StoredProcedurePara
meter sp in p.Parameters)
{
Console.WriteLine(sp.Name + "," +
sp.DataType.ToString() + "," +
(sp.IsOutputParameter ? "Input/Output" : "Input"));
}

--
HTH,
Jasper Smith (SQL Server MVP)
http://www.sqldbatips.com


"Lee" <Lee@discussions.microsoft.com> wrote in message
news:7977CBBF-A908-43B7-81F6- 2DF84D53030A@microso
ft.com...
> Using SMO for .NET 2.0 how can I determine...
> If a stored procedure's parameter is Input only, or input/output?



Sponsored Links





Also available: Server administration forum archive | Web Design forum archive | Software forum archive | Hardware reviews archive | Programming forum archive

Copyright 2008 droptable.com