BDC ADF og vinur þinn, 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. Svo, this awkward construction:

<Eign Nafn="RdbCommandText" Tegund="System.String">
SELECT dbo.MCRS_SETTLEMENT.id, dbo.MCRS_SETTLEMENT.settlement from dbo.MCRS_SETTLEMENT
HVAR (id &GT;= @MinId) AND (id &lt;= @ MaxId)
</Eign>

can be better represented this way:

<Eign Nafn="RdbCommandText" Tegund="System.String">
<![CDATA[
SELECT dbo.MCRS_SETTLEMENT.id, dbo.MCRS_SETTLEMENT.settlement from dbo.MCRS_SETTLEMENT
HVAR (id >= @MinId) AND (id <= @MaxId)
]]>
</Eign>

</enda>

BDC Primer

Intro to BDC

Ein hugsun um „BDC ADF og vinur þinn, CDATA

  1. Guru Prasad Nagaraju
    Very nice! Thanks for pointing this out to the community. I have been using the same those(&lt; og &GT;) until now without realizing that CDATA could have been used. Takk aftur!
    Svara

Leyfi svar við Guru Prasad Nagaraju Hætta við svar

Netfangið þitt verður ekki birt. Nauðsynlegir reitir eru merktir *