如何在网页中显示word文件

发表于:2007-06-30来源:作者:点击数: 标签:
我把一些word文件存储到 数据库 中但我如下取的时候让下载asp文件 %@ Language= VB Script % % myid=chenhao Response.Expires = 0 Response.Buffer = TRUE Response.Clear Response.ContentType = Application/msword set conn=server.CreateObject (adodb.c
我把一些word文件存储到数据库中但我如下取的时候让下载asp文件
<%@ Language=VBScript %>
<%
myid="chenhao"
Response.Expires = 0
Response.Buffer = TRUE
Response.Clear
Response.ContentType = "Application/msword"
set conn=server.CreateObject ("adodb.connection")
conn.open  Application("jsjxywebdatebase_ConnectionString"),Application("jsjxywebdatebase_RuntimeUserName"),Application("jsjxywebdatebase_RuntimePassword")
set rs=server.CreateObject ("adodb.recordset")
rs.CursorType =2
rs.LockType=3
rs.ActiveConnection=conn
rs.Source="select * from userimage where id=‘’"& myid &"‘’"
rs.Open
Response.BinaryWrite rs("userimage") //userimage现在存储的是word文件
Response.End
rs.Close
set rs=nothing
conn.Close
set conn=nothing
%>
请问是那里的错误?

原文转自:http://www.ltesting.net