blondebier
Programmer
I've created the following file to generate XML from my access database. I'm testing it locally using IIS and when I run the ASP file it seems to slow my computer vastly.
There is a lot of HDD activity but nothing seems to happen. There aren't any error messages either.
<%@LANGUAGE="VBScript"%>
<!-- #include file="datastore.asp" -->
<% Response.ContentType = "text/xml" %>
<% strDate = Year(Now) & "-" & Right("00" & Month(Now), 2) & "-" &_
Right("00" & Day(Now), 2) %>
<?xml version="1.0" ?>
<dailyReports ="<% = strDate %>">
<intro>This is an XML Document of the Database</intro>
<% '-- select all the report details --
QUOT = Chr(34)
On Error Resume Next
Set oConn = Server.CreateObject("ADODB.Connection"
oConn.Open strConnect
strSQL="SELECT * FROM Data ORDER BY File"
Set oRs = oConn.Execute(strSQL)
Do While Not oRs.EOF
strContact = oRs("Contact"
strAddress = oRs("Address"
strTown = oRs("Town"
strCounty = oRs("County"
strPostcode = oRs("Postcode"
strTelephone = oRs("Telephone"
%>
<report>
<Contact><% = strContact %></Contact>
<Address><% = strAddress %></Address>
<Town><% = strTown %></Town>
<County><% = strCounty %></County>
<Postcode><% = strPostcode %></Postcode>
<Telephone><% = strTelephone %></Telephone>
</report>
<%
oRs.MoveNext
Loop
oRs.Close
oConn.Close
Set oConn = Nothing
Set oRs = Nothing
%>
</dailyReports>
Is this the best way to go about it?
There is a lot of HDD activity but nothing seems to happen. There aren't any error messages either.
<%@LANGUAGE="VBScript"%>
<!-- #include file="datastore.asp" -->
<% Response.ContentType = "text/xml" %>
<% strDate = Year(Now) & "-" & Right("00" & Month(Now), 2) & "-" &_
Right("00" & Day(Now), 2) %>
<?xml version="1.0" ?>
<dailyReports ="<% = strDate %>">
<intro>This is an XML Document of the Database</intro>
<% '-- select all the report details --
QUOT = Chr(34)
On Error Resume Next
Set oConn = Server.CreateObject("ADODB.Connection"
oConn.Open strConnect
strSQL="SELECT * FROM Data ORDER BY File"
Set oRs = oConn.Execute(strSQL)
Do While Not oRs.EOF
strContact = oRs("Contact"
strAddress = oRs("Address"
strTown = oRs("Town"
strCounty = oRs("County"
strPostcode = oRs("Postcode"
strTelephone = oRs("Telephone"
%>
<report>
<Contact><% = strContact %></Contact>
<Address><% = strAddress %></Address>
<Town><% = strTown %></Town>
<County><% = strCounty %></County>
<Postcode><% = strPostcode %></Postcode>
<Telephone><% = strTelephone %></Telephone>
</report>
<%
oRs.MoveNext
Loop
oRs.Close
oConn.Close
Set oConn = Nothing
Set oRs = Nothing
%>
</dailyReports>
Is this the best way to go about it?