dongpai9986 2014-11-03 14:56
浏览 33
已采纳

SQL Server 2008 R2 - 检索过程输入/输出参数

I am developing an application in PHP connected with SQL Server 2008 R2, my requirement is getting list of input / output parameters (METADATA) from procedure(s) and generating run time forms on the screen. I have around fifty scenarios e.g. get order details, get pending orders etc.

So instead of developing those 50 screens,I have decided to generate these forms on run time. Now I Googled my problem a bit and I came to know this feature is given in SQL Server 2012 by using sp_describe_first_result_set. Reference: link

Is there a way to achieve this in SQL Server 2008?

  • 写回答

2条回答 默认 最新

  • doujiu8145 2014-11-03 15:30
    关注

    The next query returns a list of stored procedures and their parameters from the current database:

    select pr.object_id [procedure_id]
    , pr.name [procedure_name]
    , p.parameter_id
    , p.name [parameter_name]
    , p.is_output
    from sys.parameters p
    join sys.procedures pr on p.object_id = pr.object_id
    order by pr.object_id, p.parameter_id
    
    本回答被题主选为最佳回答 , 对您是否有帮助呢?
    评论
查看更多回答(1条)

报告相同问题?

悬赏问题

  • ¥15 求差集那个函数有问题,有无佬可以解决
  • ¥15 【提问】基于Invest的水源涵养
  • ¥20 微信网友居然可以通过vx号找到我绑的手机号
  • ¥15 寻一个支付宝扫码远程授权登录的软件助手app
  • ¥15 解riccati方程组
  • ¥15 display:none;样式在嵌套结构中的已设置了display样式的元素上不起作用?
  • ¥15 使用rabbitMQ 消息队列作为url源进行多线程爬取时,总有几个url没有处理的问题。
  • ¥15 Ubuntu在安装序列比对软件STAR时出现报错如何解决
  • ¥50 树莓派安卓APK系统签名
  • ¥65 汇编语言除法溢出问题