当前位置: 首页 > 图文教程 > 网络编程 > 编程10000问 > 如何把图片也存到数据库中去?

编程10000问
ASP问答集
asp中在JScript中使用RecordSet对象的GetRows
oblog_4.6_SQL 语句

编程10000问 中的 如何把图片也存到数据库中去?


出处:互联网   整理: 软晨网(RuanChen.com)   发布: 2010-01-10   浏览: 34 ::
收藏到网摘: n/a

showimage.asp

Change the HTTP header

Response.ContentType = "image/gif"

Set cn = Server.CreateObject("ADODB.Connection")

cn.Open "driver={SQL Server};server=.;UID=sa;PWD=;DATABASE=pubs"

Set rs = cn.Execute("select logo from pub_info WHERE pub_id='0736'")

Response.BinaryWrite rs("logo")

Response.End

showimage.htm

<html>

<head><title>闪亮日子之人事档案管理系统图片显示/title></head>

<body>

<ing src=" showimage.asp ">

</body></html>

[1]