如何使用 sp_getProcedureColumns()?

发布于 2024-09-08 11:29:52 字数 81 浏览 4 评论 0原文

如何使用 sp_getProcedureColumns()?

我找不到它的任何文档。

谢谢,

霍华德

How do you use sp_getProcedureColumns()?

I cannot find any documentation for it.

Thanks,

Howard

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

挽手叙旧 2024-09-15 11:29:52

我不确定为什么没有记录该系统程序。但是,我相信它使用与 sp_GetColumns。例如,

execute procedure sp_getProcedureColumns(null, null, 'myAEP', null );

根据另一个问题中的评论,您可能也对 AdsCommand.DeriveParameters 感兴趣。这是一个例子:

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() );

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() );
~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文