日期:2014-05-16 浏览次数:20820 次
<!--#include file="../easp.asp"-->
<%
Dim rs, sql, fieldSize
sql = "Select * From 上传文件 Where fileID=1"
Set rs = Server.CreateObject("ADODB.Recordset")
Easp.db.Conn = Easp.db.OpenConn("Access", "NorthWind.mdb", "")
rs.Open sql, Easp.db.Conn, 1, 3
If Not rs.Eof Then
fieldSize = rs("fileContent").ActualSize
Response.ContentType= rs("fileMime")
Response.AddHeader "Content-Length", fieldSize
Response.AddHeader "Content-Type", rs("fileMime")
Response.AddHeader "Content-Disposition","attachment; filename=""" & rs("fileName") & """"
'Response.BinaryWrite rs("fileContent")
Response.BinaryWrite rs("fileContent").GetChunk(fieldSize)
End If
%>