从数据库取图片,无法在页面上显示出来~~?
取图片showimg.asp
<%
set connGraph=server.CreateObject("ADODB.connection")
connGraph.ConnectionString="driver={SQL Server};server=Localhost;database=FileTest;uid=sa;pwd="
connGraph.Open
set rs=server.createobject("ADODB.recordset")
strsql="select img from images where id=3"
rs.open strsql,connGraph,1,1
Response.ContentType = "image/gif"
Response.BinaryWrite rs("img")
rs.close
set rs=nothing
connGraph.Close
set connGraph=nothing
%>
数据库存的图片rs("img")没问题~,rs("img").GetChunk(len)我也试过了,不行~
显示的时候就只有一个“X”