【问题标题】:how to pass a null as the store procedure parameter in WCF LOB adapter如何在 WCF LOB 适配器中将 null 作为存储过程参数传递
【发布时间】:2012-07-17 21:54:32
【问题描述】:

其中一个参数字段需要作为null传递,使用WCF lob SQL适配器,如何将null传递给存储过程参数?谢谢

【问题讨论】:

    标签: wcf biztalk


    【解决方案1】:

    假设您已通过添加生成的项目/使用 WCF 适配器服务将架构添加到您的 PROC,对于可为空的 proc 字段,Proc 请求架构应如下所示:

    <xs:element minOccurs="0" maxOccurs="1" name="MyParam" nillable="true" type="xs:int" />
    

    在您的地图中,要么使用nil value functoid 进行映射,或者如果您使用的是 XSLT,那么您可以像这样进行映射:

    <ns0:MyProc>
      <ns0:MyParam>
        <xsl:attribute name="xsi:nil">
          <xsl:value-of select="'true'" />
        </xsl:attribute>
      </ns0:MyParam>
    </ns0:MyProc>
    

    【讨论】:

      猜你喜欢
      • 2020-04-24
      • 1970-01-01
      • 2017-07-15
      • 1970-01-01
      • 1970-01-01
      • 2010-10-19
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多