Forum Moderators: open
I have seen some of the posts on this issue but none specific to my needs. Perhaps I may seem a little "slow but bare with me please.
I have a database i.e. example.mdb and I have a table which I use to save Hardware item information. Now, I have the following fields:
ID
Code
Type
Description
Price
Image (this field is formated as a text field)
When I use the folllowing code i see all the information from the datebase but i do not see the image except for the text i.e. image.gif: (generated by Frontpage)
<!--webbot bot="DatabaseRegionStart" s-columnnames="ID,Type,Description,Price,Picture" s-columntypes="3,202,202,202,202" s-dataconnection="specials" b-tableformat="TRUE" b-menuformat="FALSE" s-menuchoice s-menuvalue b-tableborder="TRUE" b-tableexpand="TRUE" b-tableheader="TRUE" b-listlabels="TRUE" b-listseparator="TRUE" i-listformat="0" b-makeform="TRUE" s-recordsource="Specials" s-displaycolumns="ID,Type,Description,Price,Picture" s-criteria s-order s-sql="SELECT * FROM Specials" b-procedure="FALSE" clientside suggestedext="asp" s-defaultfields s-norecordsfound="No records returned." i-maxrecords="256" i-groupsize="5" botid="0" u-dblib="_fpclass/fpdblib.inc" u-dbrgn1="_fpclass/fpdbrgn1.inc" u-dbrgn2="_fpclass/fpdbrgn2.inc" tag="TBODY" preview="<tr><td colspan=64 bgcolor="#FFFF00" align="left" width="100%"><font color="#000000">This is the start of a Database Results region. The page must be fetched from a web server with a web browser to display correctly; the current web is stored on your local disk or network.</font></td></tr>" startspan --><!--#include file="_fpclass/fpdblib.inc"-->
<% if 0 then %>
<SCRIPT Language="JavaScript">
document.write("<div style='background: yellow; color: black;'>The Database Results component on this page is unable to display database content. The page must have a filename ending in '.asp', and the web must be hosted on a server that supports Active Server Pages.</div>");
</SCRIPT>
<% end if %>
<%
fp_sQry="SELECT * FROM Specials"
fp_sDefault=""
fp_sNoRecords="<tr><td colspan=5 align=left width=""100%"">No records returned.</td></tr>"
fp_sDataConn="specials"
fp_iMaxRecords=256
fp_iCommandType=1
fp_iPageSize=5
fp_fTableFormat=True
fp_fMenuFormat=False
fp_sMenuChoice=""
fp_sMenuValue=""
fp_iDisplayCols=5
fp_fCustomQuery=False
BOTID=0
fp_iRegion=BOTID
%>
<!--#include file="_fpclass/fpdbrgn1.inc"-->
<!--webbot bot="DatabaseRegionStart" endspan i-checksum="41967" --><tr>
<td>
<!--webbot bot="DatabaseResultColumn" s-columnnames="ID,Type,Description,Price,Picture" s-column="ID" b-tableformat="TRUE" b-hashtml="FALSE" b-makelink="FALSE" clientside b-MenuFormat preview="<font size="-1">&lt;&lt;</font>ID<font size="-1">&gt;&gt;</font>" startspan --><%=FP_FieldVal(fp_rs,"ID")%><!--webbot bot="DatabaseResultColumn" endspan i-checksum="62813" --></td>
<td>
<!--webbot bot="DatabaseResultColumn" s-columnnames="ID,Type,Description,Price,Picture" s-column="Type" b-tableformat="TRUE" b-hashtml="FALSE" b-makelink="FALSE" clientside b-MenuFormat preview="<font size="-1">&lt;&lt;</font>Type<font size="-1">&gt;&gt;</font>" startspan --><%=FP_FieldVal(fp_rs,"Type")%><!--webbot bot="DatabaseResultColumn" endspan i-checksum="7359" --></td>
<td>
<!--webbot bot="DatabaseResultColumn" s-columnnames="ID,Type,Description,Price,Picture" s-column="Description" b-tableformat="TRUE" b-hashtml="FALSE" b-makelink="FALSE" clientside b-MenuFormat preview="<font size="-1">&lt;&lt;</font>Description<font size="-1">&gt;&gt;</font>" startspan --><%=FP_FieldVal(fp_rs,"Description")%><!--webbot bot="DatabaseResultColumn" endspan i-checksum="30092" --></td>
<td>
<!--webbot bot="DatabaseResultColumn" s-columnnames="ID,Type,Description,Price,Picture" s-column="Price" b-tableformat="TRUE" b-hashtml="FALSE" b-makelink="FALSE" clientside b-MenuFormat preview="<font size="-1">&lt;&lt;</font>Price<font size="-1">&gt;&gt;</font>" startspan --><%=FP_FieldVal(fp_rs,"Price")%><!--webbot bot="DatabaseResultColumn" endspan i-checksum="9640" --></td>
<td>
<!--webbot bot="DatabaseResultColumn" s-columnnames="ID,Type,Description,Price,Picture" s-column="Picture" b-tableformat="TRUE" b-hashtml="FALSE" b-makelink="FALSE" clientside b-MenuFormat preview="<font size="-1">&lt;&lt;</font>Picture<font size="-1">&gt;&gt;</font>" startspan --><%=FP_FieldVal(fp_rs,"Picture")%><!--webbot bot="DatabaseResultColumn" endspan i-checksum="13538" --></td>
</tr>
<!--webbot bot="DatabaseRegionEnd" b-tableformat="TRUE" b-menuformat="FALSE" u-dbrgn2="_fpclass/fpdbrgn2.inc" i-groupsize="5" clientside tag="TBODY" preview="<tr><td colspan=64 bgcolor="#FFFF00" align="left" width="100%"><font color="#000000">This is the end of a Database Results region.</font></td></tr><TR><TD ALIGN=LEFT VALIGN=MIDDLE COLSPAN=64><NOBR><INPUT TYPE=Button VALUE=" ¦< "><INPUT TYPE=Button VALUE=" < "><INPUT TYPE=Button VALUE=" > "><INPUT TYPE=Button VALUE=" >¦ "> [1/5]</NOBR><BR></td></tr>" startspan --><!--#include file="_fpclass/fpdbrgn2.inc"-->
<!--webbot bot="DatabaseRegionEnd" endspan i-checksum="62730" -->
Any help? I do not know a thing about coding with ASP so please give me a break.
Thanks and Regards,
Sean
<!--webbot bot="DatabaseResultColumn" s-columnnames="ID,Type,Description,Price,Picture" s-column="Picture" b-tableformat="TRUE" b-hashtml="FALSE" b-makelink="FALSE" clientside b-MenuFormat preview="<font size="-1">&lt;&lt;</font>Picture<font size="-1">&gt;&gt;</font>" startspan --><%=FP_FieldVal(fp_rs,"Picture")%><!--webbot bot="DatabaseResultColumn" endspan i-checksum="13538" --> manually to
<IMG SRC="<%=FP_Field(fp_rs,"Picture")%>" ALT="somealttext" HEIGHT="123" WIDTH="456"> to display the image.
You can replace it in html-view without a problem, I did it so many times before I learned to code asp manually
Is it correct that my database field is text formating and how would I correctly display the path? i.e. ../images/example.gif OR <img src="/image/example.gif> etc etc.
Thanks again