网络编程
位置:首页>> 网络编程>> Asp编程>> 如何把图片也存到数据库中去?

如何把图片也存到数据库中去?

 来源:asp之家 发布时间:2009-11-06 13:56:00 

标签:数据库,图片,显示

 见以下两个文件:

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>


 

0
投稿

猜你喜欢

手机版 网络编程 asp之家 www.aspxhome.com