Huara
06-10-2003, 05:30 AM
Hello
"How can I display a field that is an image( photo) from a recordset"
I have no problem with text field, they are displaying fine
the data base is in Access:
field name: Type
cod_caritu text
nam_caritu text
pho_caritu Objet OLE
I have used this code:
<% RS.MoveFirst
Do While Not RS.EOF%>
<%=RS("cod_caritu")%>
<Img src="<%=RS("pho_caritu")%>"><BR>
<%
RS.MoveNext
Loop %>
And this, but is the same, there is no display with the 3° field that is a photo:
<% RS.MoveFirst
Do While Not RS.EOF
Response.Write(" Code: " & RS("cod_caritu") & "<BR>")
Response.write(" Name: " & RS("nam_caritu") & "<BR>")
Response.write(" Photo: " & RS("pho_caritu") & "</P>")
RS.MoveNext
Loop %>
3° way
<%@ LANGUAGE="VBScript"%>
<% Response.ContentType = "image/GIF" %>
<BODY>
<% RS.MoveFirst
Do While Not RS.EOF%>
<%=RS("cod_caritu")%>
<% Response.write(RS("pho_caritu")) %> <BR>
<%
RS.MoveNext
Loop %>
so it failed again
maybe I am not using in the right way : <% Response.ContentType = "image/GIF" %>
I'll appreciate if someone could help me, thanks
"How can I display a field that is an image( photo) from a recordset"
I have no problem with text field, they are displaying fine
the data base is in Access:
field name: Type
cod_caritu text
nam_caritu text
pho_caritu Objet OLE
I have used this code:
<% RS.MoveFirst
Do While Not RS.EOF%>
<%=RS("cod_caritu")%>
<Img src="<%=RS("pho_caritu")%>"><BR>
<%
RS.MoveNext
Loop %>
And this, but is the same, there is no display with the 3° field that is a photo:
<% RS.MoveFirst
Do While Not RS.EOF
Response.Write(" Code: " & RS("cod_caritu") & "<BR>")
Response.write(" Name: " & RS("nam_caritu") & "<BR>")
Response.write(" Photo: " & RS("pho_caritu") & "</P>")
RS.MoveNext
Loop %>
3° way
<%@ LANGUAGE="VBScript"%>
<% Response.ContentType = "image/GIF" %>
<BODY>
<% RS.MoveFirst
Do While Not RS.EOF%>
<%=RS("cod_caritu")%>
<% Response.write(RS("pho_caritu")) %> <BR>
<%
RS.MoveNext
Loop %>
so it failed again
maybe I am not using in the right way : <% Response.ContentType = "image/GIF" %>
I'll appreciate if someone could help me, thanks