写入: 1:把gif图像文件读入内存(一个变量strtemp)。 2:写入数据库。 dim bintmp() as byte dim conn as adodb.connection dim rs as adodb.recordset dim strsql as string set conn = new adodb.connection set rs = new adodb.recordset conn.open "db" strsql = "select * from tbimage" rs.open strsql, conn, 1, 3 openfile ("bayshore.jpg") '请自己实现openfile函数 rs.addnew rs.fields("image").appendchunk bintmp rs.update 读出和显示: show.asp: <% dim p dim l l = 8192 dim conn,rs,strsql set conn=server.createobject("adodb.connection") conn.open "provider=microsoft.jet.oledb.4.0;data source=" &server.mappath(".") & "/db2.mdb;persist security info=false" set rs=server.createobject("adodb.recordset") strsql = "select * from tbimage" response.contenttype = "image/gif" 'important! rs.open strsql,conn,1,1 rs.movelast do p = rs("image").getchunk(l) response.binarywrite p if lenb(p) < l then exit do loop %> 在html中: <image src=show.asp>