I'm trying my hand at building an XML string using the XML api, and I am following the example in the sample script. But I am getting an error when I attempt to take the return values from a sql select and write them to an element in the xml. Here is snippet of code that is causing the error:
<sql "select id, PATN_TTL, PATN_ISD, PATN_WKU, OWNR_NAM from PATN where PATN_WKU in ('7777777') order by PATN_ISD desc, PATN_WKU desc">
<$ret = (xmlWriterStartElement($writer, 'row'))>
<$ret = (xmlWriterWriteElement($writer, 'id', '$id'))>
<$ret = (xmlWriterWriteElement($writer, 'Title', '$PATN_TTL'))>
<$ret = (xmlWriterWriteElement($writer, 'IssueDate', '$PATN_ISD'))>
<$ret = (xmlWriterWriteElement($writer, 'DocID', '$PATN_WKU'))>
<$ret = (xmlWriterWriteElement($writer, 'Assignee', '$OWNR_NAM'))>
<$ret = (xmlWriterEndElement($writer))>
</sql>
The errors are on the calls to xmlWriterWriteElement, and each call generates errors as follows:
<!-- 015 /crosshairs:5013: Vortex parameter count does not equal SQL-prep parameter count: 2 != 1 in the function vsvtx_prep -->
<!-- 100 /crosshairs:5013: Cannot compile SQL expression: Vortex arg count 2 != SQL arg count 1 in the function expr2sql -->
Your help is appreciated.
<sql "select id, PATN_TTL, PATN_ISD, PATN_WKU, OWNR_NAM from PATN where PATN_WKU in ('7777777') order by PATN_ISD desc, PATN_WKU desc">
<$ret = (xmlWriterStartElement($writer, 'row'))>
<$ret = (xmlWriterWriteElement($writer, 'id', '$id'))>
<$ret = (xmlWriterWriteElement($writer, 'Title', '$PATN_TTL'))>
<$ret = (xmlWriterWriteElement($writer, 'IssueDate', '$PATN_ISD'))>
<$ret = (xmlWriterWriteElement($writer, 'DocID', '$PATN_WKU'))>
<$ret = (xmlWriterWriteElement($writer, 'Assignee', '$OWNR_NAM'))>
<$ret = (xmlWriterEndElement($writer))>
</sql>
The errors are on the calls to xmlWriterWriteElement, and each call generates errors as follows:
<!-- 015 /crosshairs:5013: Vortex parameter count does not equal SQL-prep parameter count: 2 != 1 in the function vsvtx_prep -->
<!-- 100 /crosshairs:5013: Cannot compile SQL expression: Vortex arg count 2 != SQL arg count 1 in the function expr2sql -->
Your help is appreciated.