Hi,
I have an asp page that queries an SQL Server 2000 database, the user should then be able to save the resultset as an Excel file, using IE6
When the user clicks on the relevant link (for example GenerateUsers.asp?MODE=GLOBAL), a 'File Download' dialog is displayed prompting the user to either Open, Save or Cancel.
If the user clicks on Save, after a while (I have done various tests ranging from 30 - 60 seconds) the following
message is displayed:
The connection to the server was reset
If the user clicks on Open, after similar amount of time the The page cannot be displayed IE page is shown.
The file size is about 3.50MB for GLOBAL mode.
The above error is just occurring when MODE=GLOBAL.
The file sizes for AMERICAS and BOTH modes are 482KB and 35.5KB respectively.
Any help on this would be extremely appreciated.
Thanks
Dabase
I have an asp page that queries an SQL Server 2000 database, the user should then be able to save the resultset as an Excel file, using IE6
Code:
<%
'*********************************
'* Web Page: GenerateUsers.asp
'*********************************
%>
<%
Response.expires = 0
Response.CacheControl = "no-cache"
Response.ContentType = "application/vnd.ms-excel"
Server.ScriptTimeout = 2000
Dim sMODE, arrUserRecord, iflgURecord
sMODE = Request("MODE")
call openconn
call openComm
' Gets ID of new project
If sMODE="GLOBAL" Then
sSQL = "select * from tblusers where u_d_id <> 2 and U_Active='1'"
ElseIf sMODE="AMERICAS" Then
sSQL = "select * from tblusers where u_d_id <> 1 and U_Active='1'"
ElseIf sMODE="BOTH" Then
sSQL = "select * from tblusers where u_d_id = 3 and U_Active='1'"
End If
comm.CommandText = sSQL
comm.CommandType = 1
set rs = comm.Execute()
if not rs.eof then
arrUserRecord = rs.GetRows()
iflgURecord = 1
else
iflgURecord = 0
end if
set rs = nothing
call closeComm
Call CloseConn
%>
<title>My Admin Console</title>
<link href="stylesheets/my-admin.css" rel="stylesheet" type="text/css">
<body bottommargin="0" leftmargin="0" rightmargin="0" topmargin="0">
<table width="100%" border="1" cellpadding="0" cellspacing="0">
<tr>
<td align="left"><B>U_ID</B></td>
<td align="left"><B>U_FullName</B></td>
<td align="left"><B>U_Address1</B></td>
<td align="left"><B>U_Address2</B></td>
<td align="left"><B>U_City</B></td>
<td align="left"><B>U_State</B></td>
<td align="left"><B>U_PostCode</B></td>
<td align="left"><B>U_C_ID</B></td>
<td align="left"><B>U_Position</B></td>
<td align="left"><B>U_Company</B></td>
<td align="left"><B>U_Tel</B></td>
<td align="left"><B>U_Email</B></td>
<td align="left"><B>U_SystemID</B></td>
<td align="left"><B>U_Password</B></td>
<td align="left"><B>U_AL_ID</B></td>
<td align="left"><B>U_D_ID</B></td>
<td align="left"><B>U_MailingList</B></td>
<td align="left"><B>U_Paying</B></td>
<td align="left"><B>U_HTMLEmail</B></td>
<td align="left"><B>U_PubBy</B></td>
<td align="left"><B>U_PubDt</B></td>
<td align="left"><B>U_ModBy</B></td>
<td align="left"><B>U_ModDt</B></td>
<td align="left"><B>U_Active</B></td>
</tr>
<%IF iflgURecord = 1 Then%>
<%for i = 0 to ubound(arrUserRecord,2) %>
<tr>
<td align="left"><%=arrUserRecord(0,i)%></td>
<td align="left"><%=arrUserRecord(1,i)%></td>
<td align="left"><%=arrUserRecord(2,i)%></td>
<td align="left"><%=arrUserRecord(3,i)%></td>
<td align="left"><%=arrUserRecord(4,i)%></td>
<td align="left"><%=arrUserRecord(5,i)%></td>
<td align="left"><%=arrUserRecord(6,i)%></td>
<td align="left"><%=arrUserRecord(7,i)%></td>
<td align="left"><%=arrUserRecord(8,i)%></td>
<td align="left"><%=arrUserRecord(9,i)%></td>
<td align="left"><%=arrUserRecord(10,i)%></td>
<td align="left"><%=arrUserRecord(11,i)%></td>
<td align="left"><%=arrUserRecord(12,i)%></td>
<td align="left"><%=arrUserRecord(13,i)%></td>
<td align="left"><%=arrUserRecord(14,i)%></td>
<td align="left"><%=arrUserRecord(15,i)%></td>
<td align="left"><%=arrUserRecord(16,i)%></td>
<td align="left"><%=arrUserRecord(17,i)%></td>
<td align="left"><%=arrUserRecord(18,i)%></td>
<td align="left"><%=arrUserRecord(19,i)%></td>
<td align="left"><%=arrUserRecord(20,i)%></td>
<td align="left"><%=arrUserRecord(21,i)%></td>
<td align="left"><%=arrUserRecord(22,i)%></td>
<td align="left"><%=arrUserRecord(23,i)%></td>
</tr>
<%Next%>
<%End If%>
</table>
</body>
When the user clicks on the relevant link (for example GenerateUsers.asp?MODE=GLOBAL), a 'File Download' dialog is displayed prompting the user to either Open, Save or Cancel.
If the user clicks on Save, after a while (I have done various tests ranging from 30 - 60 seconds) the following
message is displayed:
The connection to the server was reset
If the user clicks on Open, after similar amount of time the The page cannot be displayed IE page is shown.
The file size is about 3.50MB for GLOBAL mode.
The above error is just occurring when MODE=GLOBAL.
The file sizes for AMERICAS and BOTH modes are 482KB and 35.5KB respectively.
Any help on this would be extremely appreciated.
Thanks
Dabase