Querying EnsLib.HL7.Message via ADO/ODBC
While I can query the HL7 message class EnsLib.HL7.Message (EnsLib_HL7.Message for SQL) to my heart's content in the SQL Shell or the Management Portal's SQL page, I can't seem to SELECT anything other than ID/%Id from an ADO/ODBC client. Properties such as TimeCreated, Name, MessageTypeCategory, etc. all seem to prevent the query from ever completing EXCEPT when I provide the ID as part of the WHERE criteria.
This works fine in the Management Portal and Shell:
SELECT head.ID As HeadId, body.ID As BodyId, body.Name as BodyName
FROM Ens.MessageHeader head
INNER JOIN EnsLib_HL7.Message body
ON head.MessageBodyId = body.ID
WHERE Body.Name = 'ADT_A04'
It fails, however, when I attempt the same query over an ADO or ODBC connection.
Interestingly, this succeeds:
SELECT head.ID As HeadId,body.ID As BodyId, body.Name as BodyName
FROM Ens.MessageHeader head
INNER JOIN EnsLib_HL7.Message body
ON head.MessageBodyId = body.ID
WHERE body.ID = 5745
Is there some special juju that I need to incorporate into my client queries to get the same behavior as the Management Portal and Shell?