Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

inserting sql prepared statement in XML

Status
Not open for further replies.

lowbk

Technical User
Nov 26, 2001
162
SG
i've the following prepared sql statment

select distinct VisitID from DiabetesChart
where PID=? and (DiabetesChart.FieldValue>?
and DiabetesChart.FieldValue<?
and FieldID=1)
order by VisitID

i want to insert it into a xml
<document>
<retrieval option=&quot;1&quot;>
<sql>
select distinct VisitID from DiabetesChart
where PID=? and (DiabetesChart.FieldValue>?
and DiabetesChart.FieldValue<?
and FieldID=1)
order by VisitID&quot;
</sql>
</retrieval>
</document>

but i keep getting &quot;Whitespace is not allowed at this location&quot; when viewing the xml in IE.
the source of error is &quot;and DiabetesChart.FieldValue<?&quot;, probably because of the &quot;<?&quot;, anyone can advise how to overcome it?
 
I think it's because you can't use the &quot;<&quot; symbol in xml you have to use &#60; instead.

It may work it may not. Hope it helps!
 
Wow.. I just realized that that post looks really stupid. You have to use:

&-#-6-0-;
DROP THE DASHES WHEN YOU USE IT!

Sorry about that. When I put that value in it changed it to display &quot;<&quot;.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top