downloads.asp
资源名称:08.zip [点击查看]
上传用户:ynjin1970
上传日期:2014-10-13
资源大小:6438k
文件大小:1k
源码类别:
中间件编程
开发平台:
Visual C++
- <!--#include file="adovbs.inc" -->
- <%
- idx=trim(request("idx"))
- DbPath = SERVER.MapPath("oa.mdb")
- Set conn = Server.CreateObject("ADODB.Connection")
- conn.open "driver={Microsoft Access Driver (*.mdb)};dbq=" & DbPath
- Set rs = Server.CreateObject("ADODB.Recordset")
- rs.Open "upload",conn,adOpenDynamic,adLockOptimistic
- while not rs.eof
- if idx=trim(rs("idx")) then
- Response.ContentType = "application/octet-stream"
- Response.AddHeader "Content-Disposition", "attachment; filename="&trim(rs("f_name"))
- response.Binarywrite rs("f_data")
- Response.Flush
- rs.close
- set rs=nothing
- conn.Close
- set conn=nothing
- end if
- rs.movenext
- wend
- %>