473,326 Members | 2,337 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,326 software developers and data experts.

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
4 2408
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 thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

12
by: Simon Harvey | last post by:
Whato chaps, I work (or am hoping to work! :) for a company that specialises in the following: - Localisation of media - including software, manuals, literature and training material. -...
2
by: Waqas Ashraf | last post by:
hi, I am a newbie at xml/xsl. I m trying to generate a book of papers marked up in xml. I have a simple xml file which includes the papers, and i have xsl stylesheet document which generates the...
4
by: titanandrews | last post by:
Hi, I have ran into a situation that I think should be possible, but I am fairly new to XSLT so maybe not. Suppose I have the following document <ROOT> <FOO name="A"> <CHILD name="B"/>...
5
by: Dario de Judicibus | last post by:
I am trying to generate an XML file to be shown in IE by javascript. My code looks like top.x = window.open('','MyXML') ; top.x.document.write('<?xml version="1.0" encoding="ISO-8859-1" ?>') ;...
3
by: Brian Kwan | last post by:
Project Description: Develop a web application to help manage sale operations. There is a function that to generate a report using data in database, which is a Word document on server and let user...
2
by: Delmar | last post by:
I need to build Web Application that will generate a client to execute some operations. Each client has running silent application. Maybe somebody can advice me what can I do ? Thank you.
3
by: Eric | last post by:
Help! I created a XML schema with a Visual Studio tools. I'm filling a dataset with a DataAdapter. Before I use the "WriteXml" method to write the data to a xml file, I want to map the XSD file I...
11
by: gan | last post by:
hi dear all please help me im using the calander control from a form just i paste here the problem, the problem is when i click the calander button the calander is opening at the same time...
3
by: cleary1981 | last post by:
Hi, I know how to generate xml from php but is there an easier way to generate xml from my code? <?php $quote=$_GET; //echo $quote; require "config.php"; $q1 = mysql_query("SELECT * FROM...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.