J
Jon Westmore
I'm using an ASP page to dynamically generate an XML document using a data
source. I was thinking the concept would be similar to dynamically creating
HTML but I'm running into an issue. Here is my source code:
<%Response.ContentType = "text/xml"
Response.CharSet=""
Dim Connect ,RS, Query, Details
Details = Trim(Request("Details"))
Set Connect = Server.CreateObject("ADODB.Connection")
Connect.Open "PROVIDER=SQLOLEDB;DATA
SOURCE=is-sql;UID=infopath;PWD=infopath;DATABASE=formlib "
Set RS = Server.CreateObject("ADODB.Recordset")
Query = "SELECT * FROM patients "
Query = Query & "WHERE pt_no='"& Details & "' "
Query = Query & "ORDER BY [pt_no]"
RS.Open Query, Connect%>
<?xml version="1.0" encoding="UTF-8"?>
<?mso-infoPathSolution
name="urn:schemas-microsoft-com
ffice:infopath:source-code:-dataFormSolution"
href="manifest.xsf"
solutionVersion="1.0.0.26"
initialView="View 1"
productVersion="11.0.6357"
PIVersion="1.0.0.0"?>
<?mso-application progid="InfoPath.Document"?>
<dfs:myFields xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:q="http://schemas.microsoft.com/office/infopath/2003/ado/queryFields"
xmlns:d="http://schemas.microsoft.com/office/infopath/2003/ado/dataFields"
xmlns:dfs="http://schemas.microsoft.com/office/infopath/2003/dataFormSolution"
xmlns:my="http://schemas.microsoft.com/office/infopath/2003/myXSD/2004-12-29T14:43:25"
xmlns:xd="http://schemas.microsoft.com/office/infopath/2003">
<dfs:queryFields>
<q
rder order_id="" order_imp_dtime="" phy_id="<%= rs("mrn") %>"
pt_room=""></q
rder>
<q
rder_sub sub_order_id="" fk_order_id="" sub_order_dtime=""
sub_order_desc="" sub_order_proc="" sub_order_nurse=""></q
rder_sub>
</dfs:queryFields>
<dfs:dataFields>
<d
rder order_id="" order_imp_dtime="" phy_id="<%= rs("mrn") %>"
pt_room="">
<d
rder_sub sub_order_id="" fk_order_id="" sub_order_dtime=""
sub_order_desc="" sub_order_proc="" sub_order_nurse=""></d
rder_sub>
</d
rder>
</dfs:dataFields>
<my
hy_sig xsi:nil="true"></my
hy_sig>
<my:signatures1></my:signatures1>
</dfs:myFields>
source. I was thinking the concept would be similar to dynamically creating
HTML but I'm running into an issue. Here is my source code:
<%Response.ContentType = "text/xml"
Response.CharSet=""
Dim Connect ,RS, Query, Details
Details = Trim(Request("Details"))
Set Connect = Server.CreateObject("ADODB.Connection")
Connect.Open "PROVIDER=SQLOLEDB;DATA
SOURCE=is-sql;UID=infopath;PWD=infopath;DATABASE=formlib "
Set RS = Server.CreateObject("ADODB.Recordset")
Query = "SELECT * FROM patients "
Query = Query & "WHERE pt_no='"& Details & "' "
Query = Query & "ORDER BY [pt_no]"
RS.Open Query, Connect%>
<?xml version="1.0" encoding="UTF-8"?>
<?mso-infoPathSolution
name="urn:schemas-microsoft-com
href="manifest.xsf"
solutionVersion="1.0.0.26"
initialView="View 1"
productVersion="11.0.6357"
PIVersion="1.0.0.0"?>
<?mso-application progid="InfoPath.Document"?>
<dfs:myFields xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:q="http://schemas.microsoft.com/office/infopath/2003/ado/queryFields"
xmlns:d="http://schemas.microsoft.com/office/infopath/2003/ado/dataFields"
xmlns:dfs="http://schemas.microsoft.com/office/infopath/2003/dataFormSolution"
xmlns:my="http://schemas.microsoft.com/office/infopath/2003/myXSD/2004-12-29T14:43:25"
xmlns:xd="http://schemas.microsoft.com/office/infopath/2003">
<dfs:queryFields>
<q
pt_room=""></q
<q
sub_order_desc="" sub_order_proc="" sub_order_nurse=""></q
</dfs:queryFields>
<dfs:dataFields>
<d
pt_room="">
<d
sub_order_desc="" sub_order_proc="" sub_order_nurse=""></d
</d
</dfs:dataFields>
<my
<my:signatures1></my:signatures1>
</dfs:myFields>