请问高手如何用ASP读取sql server的 Text类型的文件出来?(

于之 于之 墨衍会员 · AI 创作全网分发 墨衍智能分发 通过墨衍一键同步至各平台 可同步平台 CSDN微信公众号微博知乎掘金百家号博客园抖音小红书 你的文章也可以这样分发 墨衍会员 ¥399起/年,写一次发全网 我也要 + 加入社区
我现在有一个Sql server表 book, 其中有两个字段,一个是 title(书名), filename(文件)Text字段,现在,我已经将一些图片或文件已经上传至这个表的 filename字段中保存了, 现在我的问题是如何通过ASP将那个字段中的文件读取出来或显示出来
exec="select * from book"
set rs=server.createobject("adodb.recordset")
rs.open exec,conn,1,1
%>
<table style="table-layout:fixed" bordercolordark=#88ddff bordercolorlight=white bgcolor=white width='100%' border="0" cellspacing="0" cellpadding="0">
<%do while not rs.eof%>
<tr height="18">
<%
ntitle=trim(rs("title"))
nfiles=rs("files")
Response.write rs("files")

%>
<td width='72%' valign='top' onmouseover="this.style.backgroundColor='#FFCCFF'; " onmouseout="this.style.backgroundColor='#FFFFFF'" style="LEFT: 0px; WORD-WRAP: break-word" align=left><a href=viewnewtj.asp?id=<%=rs("id")%> target='_blank'><img src='/images/jt1.gif' border='0'> <font color=#000000><%=ntitle%>    <a href='<%=ntitle%>'><%=nfiles%></a></font></td>
</tr>
<%
rs.movenext
loop
set rs=nothing
conn.close
set conn=nothing
%>
</table>

我这样读取都不行

是要读取那个Text类型字段中保存的文件出来,请高手指点,万分谢谢!

...全文
评论 10
收藏 已收藏
分享
返回顶部
于之
ASP 28,401 成员 356,940 内容