日期:2014-05-17  浏览次数:20763 次

请教一个用ASP显示MSSQL里已有的word文件的方法
在sql数据库里已经存有image格式的word文档,请问用ASP怎末读取显示出来呢?只要显示word里面的内容就可以了,不用进行任何的操作,谢谢!

------解决方案--------------------
id=1

set cn=server.createobject("adodb.connection")
cn.open "driver={microsoft access driver (*.mdb)};dbq=" & server.mappath("db1.mdb")
set rs=server.createobject("adodb.recordset")
rs.open "select * from word1 where id="& id,cn,1,3

'Response.ContentType = "application/msword" 用word显示

Response.ContentType = "application/ms-download" ''下载
Response.AddHeader "content-disposition", "attachment; filename=" & "c.doc"
Response.BinaryWrite rs("word")