请问高手如何用ASP读取sql server的 Text类型的文件出来?(
我现在有一个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类型字段中保存的文件出来,请高手指点,万分谢谢!
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类型字段中保存的文件出来,请高手指点,万分谢谢!
...全文
相关推荐
Python基础学习-10作用域
函数高级部分:作用域 本节课知识点: • 什么叫作用域 • 作用域的变量名解析: LEGB原则 • 3种不同的作用域描述 • global语句 • nonlocal语句
实现SQL Server 2000中图片的二进制流保存与检索
本文还有配套的精品资源,点击获取 简介:在SQL Server 2000中,使用VARBINARY(MAX)等二进制大对象(BLOB)字段类型,可以将图片及非结构化数据存储在数据库中。本操作指南详细介绍了创建数据库表、将图片文件转换为二进制数据、存储二进制数据到数据库、以及如何检索和显示图片的步骤。包括.NET环境下的文件读取、数据存储和检索以及在ASP.NET中图片的展示...
小甲鱼《零基础入门学习Python》学习笔记1.0
纯手写,要下载者,请慎重考虑……学习笔记比较精炼,有利于快速复习巩固Python的基础知识
Python编程基础作业
Python的编程基础作业,如果你想基础扎实,最好把里面所有的题目都过一遍
Python-IPythonNotebooks学Python一系列ipynb来学习基础的Python编程知识
IPython Notebooks 学 Python-一系列 ipynb 来学习基础的 Python 编程知识


