•
•
•
•
What is DaniWeb IT Discussion Community?
You're currently browsing the ASP section within the Web Development category of DaniWeb, a massive community of 391,703 software developers, web developers, Internet marketers, and tech gurus who are all enthusiastic about making contacts, networking, and learning from each other. In fact, there are 3,188 IT professionals currently interacting right now! Registration is free, only takes a minute and lets you enjoy all of the interactive features of the site.
Please support our ASP advertiser: Lunarpages ASP Web Hosting
Views: 1474 | Replies: 0
![]() |
•
•
Join Date: Oct 2006
Posts: 5
Reputation:
Rep Power: 0
Solved Threads: 0
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

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
![]() |
•
•
•
•
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
•
•
•
•
•
•
•
•
DaniWeb ASP Marketplace
•
•
•
•
.net adsl adsl1 adsl2 adsl2+ ajax asp avatar backup breach cable connection custom daniweb data protection database design developer development dom download government hacker ibm internet kb kbps medicine microsoft msdn network news normalization office per second security server skin software sql survey testing theme throughput upload vista weather xoap 240000
- Asp.net-Database Insert problem (ASP.NET)
- Problem with database connection (JSP)
- Can I run an ASP file from a Java Applet Button? (Java)
- Connection problem (MySQL)
- Internet connection problem (Windows NT / 2000 / XP / 2003)
- Connection Problems (Networking Hardware Configuration)
Other Threads in the ASP Forum
- Previous Thread: Visual interdev Problem
- Next Thread: Asp Connection idea


Linear Mode