Using ASP to Generate an XML Document

Discussion in 'ASP .Net' started by Jon Westmore, Feb 23, 2005.

  1. Jon Westmore

    Jon Westmore Guest

    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>
     
    Jon Westmore, Feb 23, 2005
    #1
    1. Advertising

  2. 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" <> wrote in message
    news:...
    > 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>
    >
    >
    >
    >
     
    Kevin Spencer, Feb 23, 2005
    #2
    1. Advertising

  3. Jon Westmore

    Patrice Guest

    And the problem is ?

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

    Patrice

    --

    "Jon Westmore" <> a écrit dans le message de
    news:...
    > 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: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: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>
    >
    >
    >
    >
     
    Patrice, Feb 23, 2005
    #3
  4. Jon Westmore

    Jon Westmore Guest

    Ignore this post, sorry

    Ignore this post, it was an accidental submission

    "Jon Westmore" <> wrote in message
    news:...
    > 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>
    >
    >
    >
    >
     
    Jon Westmore, Feb 23, 2005
    #4
  5. Re: Ignore this post, sorry

    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" <> wrote in message
    news:eM%...
    > Ignore this post, it was an accidental submission
    >
    > "Jon Westmore" <> wrote in message
    > news:...
    >> 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>
    >>
    >>
    >>
    >>

    >
    >
     
    Kevin Spencer, Feb 23, 2005
    #5
    1. Advertising

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

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. ganesh
    Replies:
    0
    Views:
    639
    ganesh
    Nov 19, 2003
  2. Tony Prichard
    Replies:
    0
    Views:
    756
    Tony Prichard
    Dec 12, 2003
  3. Manish Hatwalne
    Replies:
    1
    Views:
    406
    Martin Honnen
    Jul 13, 2004
  4. Matt
    Replies:
    3
    Views:
    358
    Bob Barrows [MVP]
    Apr 23, 2004
  5. Brian Kwan
    Replies:
    3
    Views:
    220
    Bullschmidt
    Oct 17, 2005
Loading...

Share This Page