在用ASP编程中,很多时侯要用到图象。对于单纯从数据库中处理一个图象,方法大家讲了很多,也不难,可以看下面的代码:这里假设你有个数据库名字叫:PUBS,在数据库中有一个叫:PUB_INFO的表,在表中有一个LOGO的BLOB列。我们查出PUB_ID=0736的人的相片。
FILE: SHOWIMG.ASP
***************************************
<%@ LANGUAGE="VBSCRIPT" %>
<%
Clear out the existing HTTP header information
Response.Expires = 0
Response.Buffer = TRUE
Response.Clear
Change the HTTP header to reflect that an image is being passed.
Response.ContentType = "image/gif"
Set cn = Server.CreateObject("ADODB.Connection")
The following o...[ 查看全文 ]