download data ("image") from SQL database problems
Hello every body, I am trying in ASP to upload and download pictures in a mysql database. AND I have some problem with the download, could you help me???
my code is the following:
for the upload:
'Conn.Execute("INSERT Push.imageupload(user_id,image_full,image_desc) VALUES('1',LOAD_FILE('/azerty/qsdfgh.jpeg'))")
(the field which contain the picture is a longblob type)
for the download:
SQL = "select image from XXX.YYY"
set RSIDB = conn.Execute(SQL)
Response.Expires = 0
Response.Buffer = TRUE
Response.Clear
Response.ContentType ="image/JPEG"
Response.binarywrite RSIDB("image")
And I get this:
ÿÃÿà JFIFddÿìDuckyÿîAdobedÃÿÃâ &&0$$0,%$$%,;22222;C>>>>>>CCCCCCCCCCCCCC CCCCCCCCCCCCCCC%%4%%4C4))4CCC?2?CCCCCCCC CCCCCCCCCCCCCCCCCCCCCCCCCCCCCCÿÃâf"à ¿Ã{!1AQa"qÂâ ¡±2BðÃRbÃr#3!1Qa"ÿà ?é:
I cheched the content type but it is ok, do you have other ideas???
Thanks in advance
|