Forums

This topic is locked

Display MS Access db images in form (Intranet)

Posted 27 Sep 2011 10:19:40
1
has voted
27 Sep 2011 10:19:40 Werner Beukes posted:
Hey all, i used a very nice tutorial, that helped me create a page where the companies user can input their images and text on a asp page, the data captured in access db and displayed to them again in a webpage. Problem is im using Dreamweaver CS4's coding and the tutorial was done with asp classic, which is not a problem.

The problem is i'd like to incorporate the tutorial's commands with my recordset code.


Here's my code using Dreamweaver's coding, which is also not working.

      <td height="51">[img]<%=(Recordset.Fields.Item("File Data").Value)%>"></td>
      <td class="main"><%=(Recordset.Fields.Item("contact").Value)%></td>
      <td class="main"><%=(Recordset.Fields.Item("title").Value)%></td>
      <td class="main"><%=(Recordset.Fields.Item("notes").Value)%></td>
      <td class="main"><%=(Recordset.Fields.Item("sale").Value)%></td>
      <td class="main"><%=(Recordset.Fields.Item("dbdate").Value)%></td>



Here's the table with the one line from the tutorial which is not working due to wrong coding on my side.

<td height="51"><%Response.Write "<a href=""file.asp?ID=" & rs("ID") & """>" %></td>
      <td class="main"><%=(Recordset.Fields.Item("contact").Value)%></td>
      <td class="main"><%=(Recordset.Fields.Item("title").Value)%></td>
      <td class="main"><%=(Recordset.Fields.Item("notes").Value)%></td>
      <td class="main"><%=(Recordset.Fields.Item("sale").Value)%></td>
      <td class="main"><%=(Recordset.Fields.Item("dbdate").Value)%></td>


Both coding structures above display's the text that is in the db, but not the image. Basically the one line of code i posted just above (code no 2) is the one i would like to use but can't figure out the error in that one line.

Thx[]
Edited by - Werner Beukes on 27 Sep 2011  10:23:34

Replies

Replied 27 Sep 2011 10:27:18
27 Sep 2011 10:27:18 Werner Beukes replied:
The error i get when using coding option no 2 as described above is.


QuoteMicrosoft VBScript runtime (0x800A000D)
Type mismatch: 'rs'
/SAMIntranet/showx.asp, line 56



Line 56 being:

      <td height="51"><%Response.Write "<a href=""file.asp?ID=" & rs("ID") & """>" %></td>


Reply to this topic