openstream.asp
上传用户:tiancihang
上传日期:2014-03-12
资源大小:21387k
文件大小:1k
- <%
- Dim conn,dbpath
- Set conn=Server.CreateObject("ADODB.Connection")
- dbpath=Server.MapPath("../demodata/soademo.mdb")
- conn.Open "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" &dbpath
- %>
- <%
- id=request("id")
- set rs=server.createobject("ADODB.recordset")
- sql="select * from stream where ID=" & id
- rs.open sql,conn,1,1
- Response.AddHeader "Content-Disposition","attachment;filename=aa.doc"
- Response.ContentType = "application/msword"
- Response.BinaryWrite rs("Word") '提取数据库中word文件内容
- Response.Flush
- rs.close
- set rs=nothing
- set connGraph=nothing
- %>