高分求救 把存在sql2000数据库中的word文档读出来在客户端显示
<%@LANGUAGE="VBSCRIPT" CODEPAGE="CP_ACP"%>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<title>无标题文档</title>
</head>
<% response.buffer=true %>
<%
Set conn= CreateObject("ADODB.Connection")
conn.Open "Provider=SQLOLEDB.1;Password=mis;Persist Security Info=True;User ID=sa;Initial Catalog=maintepc;Data Source=信息室-刘建民"
strSQL ="SELECT gl_gcmc,gl_jcsj,gl_hjsj,gl_hjqk ,gl_hjtp ,tepc_attachfile1 ,tepc_attachfile2 FROM zb_zlgl..yzgc_gl where gl_jxbh=11"
Set rs = Server.CreateObject("ADODB.Recordset")
set rs=server.CreateObject("adodb.recordset")
rs.Open strsql,conn,1,3
file_Rname = "1.doc"
Response.ContentType ="application/msword"
Response.AddHeader "Content-Disposition","filename=" & file_Rname
imgsize=rs("tepc_attachfile2").actualsize
Response.BinaryWrite rs("tepc_attachfile2").getchunk(20000)
RESPONSE.End()
rs.close
set rs=nothing
%>
<body>
</body>
</html>
上面是我做实验写的 可是打开全是乱吗不知怎么回事 能解决的定给高分
在线等待