Signup · Login
Stardeveloper.com  
Home · Tutorials · Forums · ASP.NET Newsletter Application · Web Hosting Plans · Faisal Khan's Blog · Contact
Forums : ASP : ADO/ODBC : the display image code is not working Signup · Login
Author Thread
the display image code is not working
Posted in tutorial: Displaying Images from an Access Database using plain ASP
·  sb165
User
Joined: 24 Apr 2003
Total Posts: 1

the display image code is not working

Posted: 24 Apr 2003
Hi, i have used your code for displaying images from the database, and adapted it. i do not have any compiler errors, but it is not workin.

my code is as follows:-

<%

Response.buffer = True

connStr = "driver={MySQL}; server=localhost; uid=sxb00u; pwd=sheetal; database=sxb00u"

Dim rs

Set rs = Server.CreateObject("ADODB.Recordset")

Dim sql_select
sql_select = "SELECT imagedata,content_type FROM image WHERE username='sheetal2' "

rs.Open sql_select, connStr,2, 4

If Not rs.EOF Then
Response.ContentType = rs("content_type")
if path is root
Response.Write "<img src=""&rs("imagedata")&"" border=""0"">"

if path is not root
Response.Write "<img src=""location\"&rs("imagedata")&"" border=""0"">"
End If

rs.Close
Set rs=Nothing

%>

I was wondering if you had any idea why it is now working.

Thank you
Want to leave a comment? Login or Register for free!

Users Who Have Visited This Thread In Last 24 Hours
1 Visitor

Login to post a comment or start a new thread
UserName Or Email Address:       Password:       Auto-Login:    
· Create New User Account
· Send Forgotten Password by Email
 
© 1999 - 2010 Stardeveloper.com, All Rights Reserved.