Paul's profilePaul Galvin's SharePoint...BlogListsSkyDrive Tools Help

Blog


    November 13

    BDC ADF and your friend, CDATA

    I've noticed some awkward and unnecessary hand-encoding of RdbCommandText in some examples (including MSDN documentation).

    I wanted to point out to newcomers to BDC that commands can be wrapped inside a CDATA tag in their "natural" form.  So, this awkward construction:

    <Property Name="RdbCommandText" Type="System.String">
    SELECT dbo.MCRS_SETTLEMENT.id, dbo.MCRS_SETTLEMENT.settlement from dbo.MCRS_SETTLEMENT
        WHERE (id &gt;= @MinId) AND (id &lt;= @MaxId)
    </Property>

    can be better represented this way:

    <Property Name="RdbCommandText" Type="System.String">
      <![CDATA[
        SELECT dbo.MCRS_SETTLEMENT.id, dbo.MCRS_SETTLEMENT.settlement from dbo.MCRS_SETTLEMENT
          WHERE (id >= @MinId) AND (id <= @MaxId)
     
    ]]>
    </Property>

    </end>

    BDC Primer

    Intro to BDC

    Comments (1)

    Please wait...
    Sorry, the comment you entered is too long. Please shorten it.
    You didn't enter anything. Please try again.
    Sorry, we can't add your comment right now. Please try again later.
    To add a comment, you need permission from your parent. Ask for permission
    Your parent has turned off comments.
    Sorry, we can't delete your comment right now. Please try again later.
    You've exceeded the maximum number of comments that can be left in one day. Please try again in 24 hours.
    Your account has had the ability to leave comments disabled because our systems indicate that you may be spamming other users. If you believe that your account has been disabled in error please contact Windows Live support.
    Complete the security check below to finish leaving your comment.
    The characters you type in the security check must match the characters in the picture or audio.
    Paul Galvin has turned off comments on this page.
    Very nice! Thanks for pointing this out to the community. I have been using the same those(&lt; and &gt;) until now without realizing that CDATA could have been used. Thanks again!
    Nov. 14

    Trackbacks (1)

    The trackback URL for this entry is:
    http://paulgalvin.spaces.live.com/blog/cns!1CC1EDB3DAA9B8AA!321.trak
    Weblogs that reference this entry