IT SOLUTIONS
Your TECHNOLOGY partner! 
-Collapse +Expand
ASP Classic
Search ASP Classic Group:

Advanced
-Collapse +Expand ASP Classic Group Home
-Collapse +Expand Message Board
-Collapse +Expand ASP Classic KB
-Collapse +Expand ASP Classic To/From
To/FromCODEGuides
-Collapse +Expand ASP Classic Study Test
PRESTWOODCERTIFIED
-Collapse +Expand ASP Classic Store
-Collapse +Expand Members Only

Prestwood eMagazine

May Edition
Subscribe now! It's Free!
Enter your email:

   ► MB LobbyASP Classic Coding BoardASP Classic Coding Topic     Print This   

Display image

Display image in ASP Classic Coding topic (part of our ASP Classic Coding group).

Quick Search: Display   Display image  
Most Recent Post

aka51
I am attempting to display an image that is stored in an access Database as an OLE Object
the code is as follows but when it rum it shows garbage caracters to the screen

   
<%

'Step 2: grab the picture from the database
Dim objConn, objRS, strSQL
strSQL = "SELECT image FROM test WHERE ID = 1 ;"

Set objConn = Server.CreateObject("ADODB.Connection")
objConn.Open "DSN=budget_demo"

Set objRS = Server.CreateObject("ADODB.Recordset")
objRS.Open strSQL, objConn

%>



<%
'Step 3: Set the ContentType to image/jpg
Response.ContentType = "image/JPEG"


'Step 4: Use Response.BinaryWrite to output the image
Response.BinaryWrite objRS("Image")

//Response.BinaryWrite objRS("image")
%>



<%
'Clean up...
objRS.Close
Set objRS = Nothing

objConn.Close
Set objConn = Nothing
%>
Peace love and happiness
 Posted 10 years ago (Thread Starter)
Comment Quote
Location=MD ,  Joined=11 years ago   MB Posts=25  
More... -Collapse +Expand
aka51
MD
Rank: Cadet 4th Year
Email A E USA
Approved member.
Member subscribes to this thread with a verified email.

Post ID #8789, No Replies Be the first!
Thread Started 1/2/2003 7:54:00 AM
View Counter=1536

Revive Thread!

Add a comment to revive this old thread and make this archived thread more useful.

Write a Comment...
Full Editor
Sign in...

If you are a member, Sign In. Or, you can Create a Free account now.


Anonymous Post:

Enter your name and security key.

Your Name:
Today's security key = P213A
Enter key:
Icon: A Post    Thread    Idea    Important!    Cool    Sad    No    Yes    Includes a Link...   
Thread #8789 Counter
1536
Since 4/2/2008
-
  Load Time=less than 1 second.
 
Print This
-
 
Have a question? Need our services? Contact us now.
--Mike Prestwood

Call: 916-726-5675

email: info@prestwood.com


1,440 People Online Now!!  
Online Now: Sign In to see who's online now!  Not a member? Join now. It's free!
Show More...


©1995-2013 PrestwoodBoards  [Security & Privacy]
Professional IT Services: Coding | Websites | Computer Tech