请问高手如何用ASP读取sql server的 Text类型的文件出来?(
于之 2006-05-18 08:59:43 我现在有一个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类型字段中保存的文件出来,请高手指点,万分谢谢!