G
Gary
Hello,
I am using asp classical and connection to SQL 2000 on a Windows 2000
machine.
I am using this code to generate a text file when the user clicks on the
link. This is so the user can download the file on an as needed basis.
DIM filename
filename = "Companies.txt"
Response.ContentType = "Unknown"
Response.AddHeader "content-disposition", "attachment;filename=""" &
filename & """"
The issue I am having is if the text file is less than approx. 1 mb then the
file downloads fine. If the file is bigger than that I get this error:
"Internet Explorer cannot download <the name of the asp page> from <the name
of the website> Internet Explorer was not able to open this internet site.
The requested site is either unavailable or cannot be found. Please try
again later."
I get my data here:
DIM rs, strSQL
Set rs = Server.CreateObject("ADODB.Recordset")
rs.CursorLocation = adUseClient
strSql = "stored procedure" & param1 & "," & param2
rs.Open strSql ,objConn ,adOpenForwardOnly ,adLockReadOnly ,adCmdtext
I then write it to a text file like this:
<%
Response.Write "CompanyName" & "|"
if not rs.BOF and not rs.EOF then
rs.MoveFirst
Do until rs.EOF
Response.Write rs.fields("Company_Name")& "|"
rs.MoveNext
Loop
end if
rs.Close
Set rs= nothing
%>
There are many more fields that are being returned but to keep it short I
only included one so you could see the layout of my code.
If someone could help me I would appreciate it.
If you need more information please let me know.
Thanks Gary
I am using asp classical and connection to SQL 2000 on a Windows 2000
machine.
I am using this code to generate a text file when the user clicks on the
link. This is so the user can download the file on an as needed basis.
DIM filename
filename = "Companies.txt"
Response.ContentType = "Unknown"
Response.AddHeader "content-disposition", "attachment;filename=""" &
filename & """"
The issue I am having is if the text file is less than approx. 1 mb then the
file downloads fine. If the file is bigger than that I get this error:
"Internet Explorer cannot download <the name of the asp page> from <the name
of the website> Internet Explorer was not able to open this internet site.
The requested site is either unavailable or cannot be found. Please try
again later."
I get my data here:
DIM rs, strSQL
Set rs = Server.CreateObject("ADODB.Recordset")
rs.CursorLocation = adUseClient
strSql = "stored procedure" & param1 & "," & param2
rs.Open strSql ,objConn ,adOpenForwardOnly ,adLockReadOnly ,adCmdtext
I then write it to a text file like this:
<%
Response.Write "CompanyName" & "|"
if not rs.BOF and not rs.EOF then
rs.MoveFirst
Do until rs.EOF
Response.Write rs.fields("Company_Name")& "|"
rs.MoveNext
Loop
end if
rs.Close
Set rs= nothing
%>
There are many more fields that are being returned but to keep it short I
only included one so you could see the layout of my code.
If someone could help me I would appreciate it.
If you need more information please let me know.
Thanks Gary