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 >= @MinId) AND (id <= @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