<%
dim conn,strcon
strcon="DBQ="+server.mappath("imgtable.mdb"
+";DefaultDir=;DRIVER={Microsoft Access Driver (*.mdb)};"
set conn=server.createobject("ADODB.CONNECTION"
conn.open strcon
set rs=server.CreateObject ("adodb.recordset"
rid=request.form("id"
strsql="SELECT * FROM images WHERE id="&rid
rs.open strsql,conn,1,3
filename=rs("name"
Dim GIFMark,binData
GIFMark = ChrB(&H47) &
ChrB(&H49) &
ChrB(&H46)
binData = RS("img"
.GetChunk(204800)
Response.AddHeader "Content-Disposition","attachment;
filename="&filename&""
Response.BinaryWrite binData
rs.close
set rs=nothing
set conn=nothing
%>