ColinMorgan
IS-IT--Management
Hi,
I'm having a problem with this script snippet...
<%
' Perform download
response.buffer=true
response.clear
' get file name from querystring
Dim strFilePath, strFileName, strFileExtn, strDnldFileName
strFilePath = "D:\inetpub\DBDir\" &
strFileName = Request.QueryString("file"
strFileExtn = ".mdb"
strDnldFileName = Request.QueryString("file" & Year(date) & Month(date) & Day(date) & strFileExtn
'Create a stream object
Dim objStream
Set objStream = Server.CreateObject("ADODB.Stream"
'Open file
objStream.Type = 1 ' Type Binary
objStream.Open
objStream.LoadFromFile strFilePath & strFileName & strFileExtn
'Output the contents of the stream object
Response.AddHeader "Content-Disposition", "attachment; filename=" & strDnldFileName
Response.ContentType = "application/octet-stream"
Response.BinaryWrite objStream.Read
'Clean up....
objStream.Close
Set objStream = Nothing
Response.flush
%>
All works but any HTML or output code fails to run after
this has finished.
Any ideas?
Regards
Colin
I'm having a problem with this script snippet...
<%
' Perform download
response.buffer=true
response.clear
' get file name from querystring
Dim strFilePath, strFileName, strFileExtn, strDnldFileName
strFilePath = "D:\inetpub\DBDir\" &
strFileName = Request.QueryString("file"
strFileExtn = ".mdb"
strDnldFileName = Request.QueryString("file" & Year(date) & Month(date) & Day(date) & strFileExtn
'Create a stream object
Dim objStream
Set objStream = Server.CreateObject("ADODB.Stream"
'Open file
objStream.Type = 1 ' Type Binary
objStream.Open
objStream.LoadFromFile strFilePath & strFileName & strFileExtn
'Output the contents of the stream object
Response.AddHeader "Content-Disposition", "attachment; filename=" & strDnldFileName
Response.ContentType = "application/octet-stream"
Response.BinaryWrite objStream.Read
'Clean up....
objStream.Close
Set objStream = Nothing
Response.flush
%>
All works but any HTML or output code fails to run after
this has finished.
Any ideas?
Regards
Colin