| Author |
Thread |
| displaying binary images |
|
Posted in tutorial: Displaying Images from an Access Database using plain ASP |
· delacru2
Joined: 28 Feb 2003 Total Posts: 2 |
displaying binary images Posted: 28 Feb 2003
Thank You Your code works well. However it could be of help to some to add <img source="file.asp?ID=<%=(rs("ID"))%>"> for those for those who want to display the image directly in to their asp/html page. Regards Julio
|
· Faisal Khan
Joined: 24 Sep 2002 Total Posts: 547 |
Re: displaying binary images Posted: 7 Mar 2003
Julio,
Yes it is possible and you've already given an example. Does it not work for you?
|
· tgina
Joined: 14 Mar 2003 Total Posts: 2 |
Display images Posted: 14 Mar 2003
Hi! This is what i started with If Not rsPrints.EOF Then Response.Write "<table border = '1'>" While Not rsPrints.EOF Response.Write "<tr>" Response.Write "<td><img src = '../" Response.Write rsPrints("File") Response.Write "' width = '130' height = '170'></td>" Response.Write "</tr>" rsPrints.MoveNext Wend Response.Write "</table>" Else Response.Write "No Items Found" End If
of course, it displays 1 image a row. How to write a code to display 4 images a row?
Thank you. Gina
|
· nidgep
Joined: 24 Mar 2003 Total Posts: 1 |
JPeg Images Posted: 24 Mar 2003
Hi Faisal
I have worked through your excellent tutorials on binary uploads.
However, I seem to be having a problem retrieving certain images from the database (Access). These are where the content type is either image/pjpeg or image/jpeg. Why is this? I am using IE6 browser.
Regards
Nigel
Programmer
|
· regmi
Joined: 24 Jun 2004 Total Posts: 2 |
Try This and mail me in my personal email Posted: 24 Jun 2004
If your Recordset contains only the filename then
<% dim rsPrints,sFile set rsPrints=Server.CreateObject("ADODB.Recordset") rsPrints.Open "SELECT FileName FROM tblName", Cnn If Not rsPrints.EOF Then %> <table border = 1> <% While Not rsPrints.EOF sFile="../images/" & rsPrints.Fields(0) & ".GIF" %> <tr> <td> <img src =<%= sFile %>> </td> </tr> <% rsPrints.MoveNext Wend
%> </table> <% End If %>
Regmi
|
· regmi
Joined: 24 Jun 2004 Total Posts: 2 |
Try This and mail me in my personal email Posted: 24 Jun 2004
If your Recordset contains only the filename then
<% dim rsPrints,sFile set rsPrints=Server.CreateObject("ADODB.Recordset") rsPrints.Open "SELECT FileName FROM tblName", Cnn If Not rsPrints.EOF Then %> <table border = 1> <% While Not rsPrints.EOF sFile="../images/" & rsPrints.Fields(0) & ".GIF" %> <tr> <td> <img src =<%= sFile %>> </td> </tr> <% rsPrints.MoveNext Wend
%> </table> <% End If %>
bdregmi@hotmail.com
Regmi
|