<object runat=server id=connpic progid="adodb.connection"></object>
<%application.Lock
connpic.Open Application("p_pic")
Application.UnLock
%>
<% 
id=request("id")

set rs=server.createobject("ADODB.recordset") 
sql="select * from pic where id=" & id
rs.open sql,connpic,1,1 
Response.ContentType = "image/jpeg" 
Response.BinaryWrite rs("big")
rs.close 
set rs=nothing 

%> 
