467,145 Members | 1,043 Online
Bytes | Developer Community
Ask Question

Home New Posts Topics Members FAQ

Post your question to a community of 467,145 developers. It's quick & easy.

Using ASP to Generate an XML Document

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

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

</dfs:queryFields>

<dfs:dataFields>

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

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

</d:order>

</dfs:dataFields>

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

<my:signatures1></my:signatures1>

</dfs:myFields>


Nov 19 '05 #1
  • viewed: 2082
Share:
4 Replies
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.
"Jon Westmore" <we*****@reidhosp.com> wrote in message
news:u4*************@TK2MSFTNGP10.phx.gbl...
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:office: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:order order_id="" order_imp_dtime="" phy_id="<%= rs("mrn") %>"
pt_room=""></q:order>

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

</dfs:queryFields>

<dfs:dataFields>

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

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

</d:order>

</dfs:dataFields>

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

<my:signatures1></my:signatures1>

</dfs:myFields>

Nov 19 '05 #2
And the problem is ?

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

Patrice

--

"Jon Westmore" <we*****@reidhosp.com> a écrit dans le message de
news:u4*************@TK2MSFTNGP10.phx.gbl...
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:office: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:d="http://schemas.microsoft.com/office/infopath/2003/ado/dataFields"

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

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

</dfs:queryFields>

<dfs:dataFields>

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

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

</d:order>

</dfs:dataFields>

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

<my:signatures1></my:signatures1>

</dfs:myFields>

Nov 19 '05 #3
Ignore this post, it was an accidental submission

"Jon Westmore" <we*****@reidhosp.com> wrote in message
news:u4*************@TK2MSFTNGP10.phx.gbl...
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:office: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:order order_id="" order_imp_dtime="" phy_id="<%= rs("mrn") %>"
pt_room=""></q:order>

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

</dfs:queryFields>

<dfs:dataFields>

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

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

</d:order>

</dfs:dataFields>

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

<my:signatures1></my:signatures1>

</dfs:myFields>

Nov 19 '05 #4
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" <we*****@reidhosp.com> wrote in message
news:eM****************@tk2msftngp13.phx.gbl...
Ignore this post, it was an accidental submission

"Jon Westmore" <we*****@reidhosp.com> wrote in message
news:u4*************@TK2MSFTNGP10.phx.gbl...
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:office: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:order order_id="" order_imp_dtime="" phy_id="<%= rs("mrn") %>"
pt_room=""></q:order>

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

</dfs:queryFields>

<dfs:dataFields>

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

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

</d:order>

</dfs:dataFields>

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

<my:signatures1></my:signatures1>

</dfs:myFields>


Nov 19 '05 #5

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

2 posts views Thread by Waqas Ashraf | last post: by
4 posts views Thread by titanandrews@hotmail.com | last post: by
5 posts views Thread by Dario de Judicibus | last post: by
2 posts views Thread by Delmar | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.