BDC ADF na rafiki yako, 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. Hivyo, this awkward construction:

<Mali Jina="RdbCommandText" Aina="System.String">
SELECT dbo.MCRS_SETTLEMENT.id, dbo.MCRS_SETTLEMENT.settlement from dbo.MCRS_SETTLEMENT
WAPI (id &gt;= @MinId) NA (id &lt;= @ MaxId)
</Mali>

can be better represented this way:

<Mali Jina="RdbCommandText" Aina="System.String">
<![CDATA[
SELECT dbo.MCRS_SETTLEMENT.id, dbo.MCRS_SETTLEMENT.settlement from dbo.MCRS_SETTLEMENT
WAPI (id >= @MinId) NA (id <= @MaxId)
]]>
</Mali>

</mwisho>

BDC Primer

Intro to BDC

Wazo moja juu ya "BDC ADF na rafiki yako, CDATA

  1. Guru Prasad Nagaraju
    Very nice! Thanks for pointing this out to the community. I have been using the same those(&lt; na &gt;) until now without realizing that CDATA could have been used. Shukrani tena!
    Kujibu

Kuondoka Reply

Anwani yako si kuchapishwa. Mashamba required ni alama *