downloads.asp

来自「VC实现等值线编成的COM组件的源程序代码」· ASP 代码 · 共 23 行

ASP
23
字号
<!--#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
%>

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?