首页 诗词 字典 板报 句子 名言 友答 励志 学校 网站地图
当前位置: 首页 > 教程频道 > 网站开发 > ASP >

请问一个用ASP显示MSSQL里已有的word文件的方法

2012-10-10 
请教一个用ASP显示MSSQL里已有的word文件的方法在sql数据库里已经存有image格式的word文档,请问用ASP怎末

请教一个用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")

热点排行
Bad Request.