Recordset size


DevX Home    Today's Headlines   Articles Archive   Tip Bank   Forums   

Results 1 to 2 of 2

Thread: Recordset size

  1. #1
    Paul Hickey Guest

    Recordset size


    For 2 weeks my web host and I have gone through every detail of his server(s)
    and my scripts and can not figure out why something that worked flawlessly
    has suddenly ceased to function. It only doesn't function on (larger??????)
    recordsets.Against an Access97 database I am running the follwing ASP:

    <%@ Language="JScript"%>
    <!--#include file="adojavas.inc"-->
    <%

    var conn = Server.CreateObject("ADODB.Connection");
    conn.Open("DSN=businesses");
    var rs = Server.CreateObject("ADODB.Recordset");
    var stm = Server.CreateObject("ADODB.Stream");
    rs.Open("SELECT CompanyName, Address1, Phone FROM area407 WHERE City='MELBOURNE'",
    conn);

    rs.Save(stm, adPersistXML);

    Response.ContentType = "text/xml";
    Response.Write('\<?xml-stylesheet type=\'text/xsl\' href=\'recordsetxml.xsl\'?\>\n');
    Response.Write (stm.ReadText);

    stm.Close;
    rs.Close;
    %>


    Recordsetxml.xsl is the following:
    <?xml version="1.0"?>
    <xsl:stylesheet xmlns:xsl="http://www.w3.org/TR/WD-xsl">
    <xsl:template match="/">
    <HTML><HEAD><TITLE>City Directory</TITLE></HEAD>
    <BODY><FONT FACE="Arial" size="2">
    <TABLE STYLE="table-layout:fixed" WIDTH="100%" BORDER="1" CELLSPACING="0"
    MARGIN="0" >
    <TR>
    <xsl:for-each select="*/s:Schema/s:ElementType/s:AttributeType">

    </xsl:for-each>
    </TR>
    <xsl:for-each select="*/rs:data/z:row">
    <TR BGCOLOR="C0C0C0" BORDERCOLOR ="0000FF" >
    <xsl:for-each select="@*">
    <TD><FONT COLOR="BLUE" size="1"><xsl:value-of/></FONT></TD>
    </xsl:for-each>
    </TR>
    </xsl:for-each>
    </TABLE>
    </FONT></BODY></HTML>
    </xsl:template>
    </xsl:stylesheet>

    The query of "Melbourne" involves 1605 records.It hits the server and then
    pegs the clients processor(s) at 100% and doesn't return anything unless
    the "Stop" button is pressed. A query that should return 728 records sometimes
    works but only after an unacceptable amount of time. A query that returns
    265 records seems to function properly. The "Melbourne" query did return
    the records in less than 2 seconds prior to Sept. 25th. We are using NT Server
    4.0 service pack 6A, IIS 4.0, MDAC 2.5 all of which worked earlier.

    You can see this in action at www.sunshinearcade.com/buslist.html

  2. #2
    sean Guest

    Re: Recordset size


    Paul,
    I do not know what your problem is but I think you may be better
    transforming the XML on the server and writing out the HTML.

    similar to
    Set xmlObj = server.createobject("MSXML.DOMDocument")
    rs.save(xmlObj,adpersistxml)

    Dim xslObj
    Set xslObj = server.createobject("MSXML.DOMDocument")
    xslObj.async = False
    xslObj.Load server.mappath("tranform.xsl")

    output = xmlObj.transformNode(xslObj)
    response.write output


    hope this helps
    Sean

    "Paul Hickey" <webmaster@sunshinearcade.com> wrote:
    >
    >For 2 weeks my web host and I have gone through every detail of his server(s)
    >and my scripts and can not figure out why something that worked flawlessly
    >has suddenly ceased to function. It only doesn't function on (larger??????)
    >recordsets.Against an Access97 database I am running the follwing ASP:
    >
    ><%@ Language="JScript"%>
    ><!--#include file="adojavas.inc"-->
    ><%
    >
    >var conn = Server.CreateObject("ADODB.Connection");
    > conn.Open("DSN=businesses");
    > var rs = Server.CreateObject("ADODB.Recordset");
    >var stm = Server.CreateObject("ADODB.Stream");
    > rs.Open("SELECT CompanyName, Address1, Phone FROM area407 WHERE City='MELBOURNE'",
    >conn);
    >
    >rs.Save(stm, adPersistXML);
    >
    >Response.ContentType = "text/xml";
    >Response.Write('\<?xml-stylesheet type=\'text/xsl\' href=\'recordsetxml.xsl\'?\>\n');
    >Response.Write (stm.ReadText);
    >
    >stm.Close;
    >rs.Close;
    >%>
    >
    >
    >Recordsetxml.xsl is the following:
    ><?xml version="1.0"?>
    ><xsl:stylesheet xmlns:xsl="http://www.w3.org/TR/WD-xsl">
    > <xsl:template match="/">
    > <HTML><HEAD><TITLE>City Directory</TITLE></HEAD>
    > <BODY><FONT FACE="Arial" size="2">
    > <TABLE STYLE="table-layout:fixed" WIDTH="100%" BORDER="1" CELLSPACING="0"
    >MARGIN="0" >
    > <TR>
    > <xsl:for-each select="*/s:Schema/s:ElementType/s:AttributeType">
    >
    > </xsl:for-each>
    > </TR>
    > <xsl:for-each select="*/rs:data/z:row">
    > <TR BGCOLOR="C0C0C0" BORDERCOLOR ="0000FF" >
    > <xsl:for-each select="@*">
    > <TD><FONT COLOR="BLUE" size="1"><xsl:value-of/></FONT></TD>
    > </xsl:for-each>
    > </TR>
    > </xsl:for-each>
    > </TABLE>
    > </FONT></BODY></HTML>
    > </xsl:template>
    ></xsl:stylesheet>
    >
    >The query of "Melbourne" involves 1605 records.It hits the server and then
    >pegs the clients processor(s) at 100% and doesn't return anything unless
    >the "Stop" button is pressed. A query that should return 728 records sometimes
    >works but only after an unacceptable amount of time. A query that returns
    >265 records seems to function properly. The "Melbourne" query did return
    >the records in less than 2 seconds prior to Sept. 25th. We are using NT

    Server
    >4.0 service pack 6A, IIS 4.0, MDAC 2.5 all of which worked earlier.
    >
    >You can see this in action at www.sunshinearcade.com/buslist.html



Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
HTML5 Development Center
 
 
FAQ
Latest Articles
Java
.NET
XML
Database
Enterprise
Questions? Contact us.
C++
Web Development
Wireless
Latest Tips
Open Source


   Development Centers

   -- Android Development Center
   -- Cloud Development Project Center
   -- HTML5 Development Center
   -- Windows Mobile Development Center