chris3000 0 Newbie Poster

Hi :)

I would expect to see an image from the database with that code:

<%
set conn=server.CreateObject("ADODB.Connection")
conn.Provider="Microsoft.jet.OLEDB.4.0"
conn.Open "F:/projet/test1.mdb"

set rs= conn.Execute("SELECT photo FROM photos where ID=1")

Response.ContentType="image/jpg"
Response.BinaryWrite(rs("photo"))

conn.Close
%>

or

with dsn(data source name) link in contral panel
<%

Set conn = Server.CreateObject("ADODB.Connection")
conn.open "WinConnection"

set rs= conn.Execute("SELECT photo FROM photos where ID=1")

Response.ContentType="image/jpg"
Response.BinaryWrite(rs("photo"))

conn.Close
%>

The only thing I get is a tons of ascii code
Anyone can help me on this ?

I get another problem

When Im doing a refresh 3 or 4 times on that asp page there is a messagebox with prompts as follows:
==================================
Title: File Download - Security Warning
Name: Setup.exe
From: localhost

Buttons: [Run] [Save] [Cancel]

While files from internet can be useful, this file type can potentially harm your computer. If you do not trust the source, do not run or save this software. (link: ) What's the risk?
================================


When i copy paste the code in a new asp file
it works like 3 or 4 times (doing some refresh) and then the messagebox come back

I tried to change security level for intranet too, but i don't know which parameter to change.

I tried with Firefox and Opera and the same problem happens.

thanx
Chris