<img src="image.asp? id=1">
---------------------------------------------------------------
<%Option Explicit%>
<!-- #include file="IMS/includes/dbconn.asp"-->
<%
dim MyConn,SQL
Set MyConn = Server.CreateOb ject("ADODB.Con nection")
MyConn.Open dbConn
SQL = "SELECT pic,name,size FROM img where id="& Request.QuerySt ring("id")
Set rs =MyConn.Execute ( SQL )
while not rs.eof then
response.Conten tType="image/jpeg"
Response.AddHea der "Content-Disposition", "attachment;fil ename=" & Trim(rs("name") )
Response.AddHea der "Content-Length", rs("size")
Response.Binary Write rs("pic")
rs.MoveNext
wend
rs.close
set rs=nothing
%>
----------------------------------------------------------
I managed to insert image into MySQL database but i can't retrieve. Any ASP expert can help me? . Thanks
---------------------------------------------------------------
<%Option Explicit%>
<!-- #include file="IMS/includes/dbconn.asp"-->
<%
dim MyConn,SQL
Set MyConn = Server.CreateOb ject("ADODB.Con nection")
MyConn.Open dbConn
SQL = "SELECT pic,name,size FROM img where id="& Request.QuerySt ring("id")
Set rs =MyConn.Execute ( SQL )
while not rs.eof then
response.Conten tType="image/jpeg"
Response.AddHea der "Content-Disposition", "attachment;fil ename=" & Trim(rs("name") )
Response.AddHea der "Content-Length", rs("size")
Response.Binary Write rs("pic")
rs.MoveNext
wend
rs.close
set rs=nothing
%>
----------------------------------------------------------
I managed to insert image into MySQL database but i can't retrieve. Any ASP expert can help me? . Thanks
Comment