Using ASP to Generate an XML Document

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:eek: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:eek:rder order_id="" order_imp_dtime="" phy_id="<%= rs("mrn") %>"
pt_room=""></q:eek:rder>

<q:eek:rder_sub sub_order_id="" fk_order_id="" sub_order_dtime=""
sub_order_desc="" sub_order_proc="" sub_order_nurse=""></q:eek:rder_sub>

</dfs:queryFields>

<dfs:dataFields>

<d:eek:rder order_id="" order_imp_dtime="" phy_id="<%= rs("mrn") %>"
pt_room="">

<d:eek:rder_sub sub_order_id="" fk_order_id="" sub_order_dtime=""
sub_order_desc="" sub_order_proc="" sub_order_nurse=""></d:eek:rder_sub>

</d:eek:rder>

</dfs:dataFields>

<my:phy_sig xsi:nil="true"></my:phy_sig>

<my:signatures1></my:signatures1>

</dfs:myFields>
 
K

Kevin Spencer

Try posting to microsoft.public.inetserver.asp.general or
microsoft.public.inetserver.asp.db.

--
HTH,

Kevin Spencer
Microsoft MVP
..Net Developer
Neither a follower nor a lender be.
 
P

Patrice

And the problem is ?

Also you may to post this in a classical ASP newsgroup (this one is for
ASPNET)

Patrice

--

Jon Westmore said:
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:eek:ffice:infopath:source-code:-dataFormSolutio
n"

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:dfs="http://schemas.microsoft.com/office/infopath/2003/dataFormSolutio
n"xmlns:my="http://schemas.microsoft.com/office/infopath/2003/myXSD/2004-12-29
T14:43:25"

xmlns:xd="http://schemas.microsoft.com/office/infopath/2003">

<dfs:queryFields>

<q:eek:rder order_id="" order_imp_dtime="" phy_id="<%= rs("mrn") %>"
pt_room=""></q:eek:rder>

<q:eek:rder_sub sub_order_id="" fk_order_id="" sub_order_dtime=""
sub_order_desc="" sub_order_proc="" sub_order_nurse=""></q:eek:rder_sub>

</dfs:queryFields>

<dfs:dataFields>

<d:eek:rder order_id="" order_imp_dtime="" phy_id="<%= rs("mrn") %>"
pt_room="">

<d:eek:rder_sub sub_order_id="" fk_order_id="" sub_order_dtime=""
sub_order_desc="" sub_order_proc="" sub_order_nurse=""></d:eek:rder_sub>

</d:eek:rder>

</dfs:dataFields>

<my:phy_sig xsi:nil="true"></my:phy_sig>

<my:signatures1></my:signatures1>

</dfs:myFields>
 
K

Kevin Spencer

Do you mean that you accidentally typed "Ignore this post, it was an
accidental submission" and then accidentally submitted it?

--
;-),

Kevin Spencer
Microsoft MVP
..Net Developer
Neither a follower nor a lender be.

Jon Westmore said:
Ignore this post, it was an accidental submission

Jon Westmore said:
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:eek: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:eek:rder order_id="" order_imp_dtime="" phy_id="<%= rs("mrn") %>"
pt_room=""></q:eek:rder>

<q:eek:rder_sub sub_order_id="" fk_order_id="" sub_order_dtime=""
sub_order_desc="" sub_order_proc="" sub_order_nurse=""></q:eek:rder_sub>

</dfs:queryFields>

<dfs:dataFields>

<d:eek:rder order_id="" order_imp_dtime="" phy_id="<%= rs("mrn") %>"
pt_room="">

<d:eek:rder_sub sub_order_id="" fk_order_id="" sub_order_dtime=""
sub_order_desc="" sub_order_proc="" sub_order_nurse=""></d:eek:rder_sub>

</d:eek:rder>

</dfs:dataFields>

<my:phy_sig xsi:nil="true"></my:phy_sig>

<my:signatures1></my:signatures1>

</dfs:myFields>
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,769
Messages
2,569,580
Members
45,054
Latest member
TrimKetoBoost

Latest Threads

Top