Ok folks could you all critique, this script of mine. The reason being is that it works fine when I test it locally on my pc, but when I put it on an intranet server running on Windows 2000 Advanced Server after a couple of request and it shows good, the memory seems to run out and I get the usual error which states,
Code:
Provider Error 80004005
Unspecified error
/current_code.asp
Here is the completed script. Just to mention, this is the script that processes your choice of radio button from another page. Here it is:
Code:
<%@LANGUAGE="VBSCRIPT" CODEPAGE="1252"%>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<title>Current Code Document 2</title>
</head>
<body>
<%
Dim countn
Sub MakeTable(SourceIn,dsnIn)
Dim oRSmt
Set oRSmt = Server.CreateObject("ADODB.Recordset")
oRSmt.CursorLocation = 3 'Used to keep count of how many records are going to be displayed
oRSmt.Open SourceIn, "DSN=" & dsnIn
oRSmt.MoveFirst
Response.Write "<TABLE BORDER='1'><TR>"
For Each Field in oRSmt.Fields
Response.Write"<TH>" & Field.name & "</TH>"
Next
Do While NOT oRSmt.EOF
Response.Write "<TR>"
For each objField in oRSmt.Fields
Response.Write "<TD>" & objField.value & " </TD>"
Next
countn = oRSmt.RecordCount 'Assign the record count to variable countn
oRSmt.MoveNext
Response.Write "</TR>"
Loop
Response.Write "</TR></TABLE>"
oRSmt.Close
Set oRSmt = nothing
End Sub
%>
<h2>REPORT RESULTS</h2>
<p>
<%
Dim sORce
sORce = Request.Form("report")
'Response.Write sORce
call MakeTable(sORce,"TileData")
%></p>
<p><br>
Total Number of Reports are:
<%
Response.Write "<strong>" & countn & "</strong>"
%>
<br>
To generate another report click your go back button or <a href="reports.asp">click here</a>. </p>
</body>
</html>
Opinions and suggestions please.