How do you use sp_getProcedureColumns()?
How do you use sp_getProcedureColumns()?
I cannot find any documentation for 开发者_运维技巧it.
Thanks,
Howard
I am unsure why that system procedure is not documented. However, I believe it uses the same syntax as sp_GetColumns. For example,
execute procedure sp_getProcedureColumns(null, null, 'myAEP', null );
And based on a comment in another question, you might also be interested in AdsCommand.DeriveParameters
. Here is an example:
AdsCommand cmd = conn.CreateCommand();
cmd.CommandText = "SomeProcedure";
cmd.CommandType = CommandType.StoredProcedure;
cmd.DeriveParameters();
foreach ( AdsParameter p in cmd.Parameters )
Console.WriteLine( "{0}, {1}, {2}", p.ParameterName, p.DbType.ToString(),
p.Direction.ToString() );
精彩评论