Test of existence on a Table \"Oracle\"

Home Page Forums BizTalk 2004 – BizTalk 2010 Test of existence on a Table \"Oracle\" Test of existence on a Table \"Oracle\"

#12428

Hi,

somebody told me that I should do with xpath, so I’ve seen a sample of
Mr. Stephen W. Thomas, and it doesn’t seem to be very difficult!

But I don’t know the syntax!!

So I would like to do that :

When I do a select on a table oracle, I receive a message like those two:

when the select returns something:

<?xml version=\”1.0\” encoding=\”utf-8\”?><patient_omnisResponse xmlns=\”http://testOracle.test/patient_omnis\”>
<Operation1>
<PATIENT_OMNIS>
<Select>
<Record>
<NOPATIENT>1</NOPATIENT>
<NODOSSIER>6</NODOSSIER>
<PATIENT_LNAME>D%u00e9l%u00e8zeeeeeeeee</PATIENT_LNAME>
<PATIENT_FNAME>Seb</PATIENT_FNAME>
<PATIENT_ROOM>135</PATIENT_ROOM>
<PATIENT_BED>2</PATIENT_BED>
</Record>
</Select>
</PATIENT_OMNIS>
</Operation1>
</patient_omnisResponse>

– When the select doesn’t return anything:

<?xml version=\”1.0\” encoding=\”utf-8\”?><patient_omnisResponse xmlns=\”http://testOracle.test/patient_omnis\”>
<Operation1>
<PATIENT_OMNIS>
<Select />
</PATIENT_OMNIS>
</Operation1>
</patient_omnisResponse>

So I would like to know if there is something in \”Select\”, but I don’t know how to do the test!

Here is my test:

nStatus = System.Convert.ToInt32(xpath(\”count(Message_ResponseSelect.parameters.Operation1.PATIENT_OMNIS.Select.Record.PATIENT_ROOM)\”));

System.Convert.ToString(nStatus);

But it doesn’t work!!
So I tried to write :
nStatus = System.Convert.ToInt32(xpath(Message_ResponseSelect,\”count(Operation1/PATIENT_OMNIS/Select/Record)\”));

But the syntax is not correct 🙁

Could you help me please ???

In this test, I would like to test the patient_room, but I can test all the record !!!

I only want to do a test of existence!!

I’ve tested the patient room, because then I would use it to test in which of the 5 decision I go!!! THe decision depends on the number room for example!!!!

Thank you in advance
A.C.