Hi, solved this by using the following function:

pRequest.SegCountGet() -> This gave me the number of segments in the HL7 Message, and because I knew that my required value is in the last segment in the 5th field, I could retrive it then using GetValueat()

This was solved by writing a new function with the PrepareW command. I had the mySQL 8.0 Unicode driver installed. 

I cannot understand why I had to write a new function but it works. Following are the checks to consider (that I made):

1. Check the quotes against the values that you enter

2. Test with PrepareW statements

3. Increase the max_allocated_packet from 4M to 16M [in the more recent versions of mySQL it is default to 512M]

Regards,

Eric

Was able to solve this by the following code.

//create a copy of the request
s newREQ = request.%ConstructClone()
ind = ""
EVNSeg = newREQ.FindSegment("EVN",.ind)
if EVNSeg '= ""
{
res = newREQ.RemoveSegmentAt(ind)
}

request = newREQ

Quit request

Hi Robert,

Thank you for responding to my question.

Looks like the default schema is in the ENSLIB namespace which does not get mirrored. I will need to create a new custom schema and make changes there which will then get backed up.

Regards,

Eric