#1
  1. No Profile Picture
    Registered User
    ASP Explorer (0 - 99 posts)

    Join Date
    Jul 2012
    Posts
    21
    Rep Power
    0

    Hyperlink To Photobucket From SQL Linked Picture In 'Images' Directory


    Hey all,

    I'm trying to figure out a way to dynamically get a picture loaded from the images directory and put a dynamic url to a picture on photobucket.

    I'm half way there.

    I have things set up so that the name of the picture column i.e. 'ASM129' will add a "s.jpg" to put in the column. Which works fine.

    However, when I try to set a similarly dynamic hyperlink to my photobucket folder, the link works (an opens in a new window like it should) but then the picture won't load in the column. It shows a little empty box that you can click on that takes you to the photobucket picture.

    How can I set this up so that I can have the picture from my local images folder appear AND link to the dynamically assigned url to photobucket.

    It appears to only do ONE of them at a time. Below is my code:

    Code:
    <%
    DO WHILE NOT oRs.EOF
    on error resume next%>
     
    <tr>
    <td class=Comics align="center"> <% Response.Write("<a href=http://i770.photobucket.com/albums/xx341/jump_ace/Comics/" & oRs.Fields("Picture") & "L.jpg" & " target='blank'>" & "<img src=images/" & oRs.Fields("Picture") & "s.jpg></a>")%></td>
    <td class=Comics align="center"> <% = oRs.Fields("Title") %></td>
    <td class=Comics align="center"> <% = oRs.Fields("Issue") %></td>
    <td class=Comics align="center"> <% = oRs.Fields("Grade") %></td>
    <td class=Comics align="center"> <% = oRs.Fields("Signature") %></td>
    <td class=Comics align="center"> <% = oRs.Fields("Serial") %></td>
    <td class=Comics align="center"> <% = oRs.Fields("Publisher") %></td>
    <td class=Comics align="center"> <% = oRs.Fields("Category") %></td>
    <td class=Comics align="center"> <% = oRs.Fields("Box") %></td>
    </tr>
    <% oRs.MoveNext %>
    <% Loop %>
    <% DbObj.Close 
    SET DbObj = Nothing 
    %>
    UPDATE - From what I can tell, it's not parsing the second 'oRs.Fields("Picture")' for some reason. When I go to try and download the jpg, it's trying to download 'localhost/image/S.jpg instead of localhost/images/(Picture column name)s.jpg.

    Is there a way I can make it parse both 'oRs.Fields("Picture")' fields?


    Thanks for any insight you can give me!


    Jerome
  2. #2
  3. No Profile Picture
    Registered User
    ASP Explorer (0 - 99 posts)

    Join Date
    Jul 2012
    Posts
    21
    Rep Power
    0
    I had to make a second SQL connector called oRs2, now it works great.


    Jerome
  4. #3
  5. No Profile Picture
    Editor in Beef
    ASP Discoverer (100 - 499 posts)

    Join Date
    Sep 2008
    Location
    South Florida
    Posts
    114
    Rep Power
    20
    Glad you solved it! Thanks for sharing the solution too!

Similar Threads

  1. Search and results of a database
    By januarygirl in forum ASP Development
    Replies: 1
    Last Post: December 3rd, 2003, 03:26 PM
  2. Return a hyperlink for re searching the database
    By MadMaxxMad in forum ASP Development
    Replies: 0
    Last Post: November 11th, 2003, 01:58 AM
  3. VB.NET - Return one value from a column in SQL Server?
    By stumpywonder in forum .NET Development
    Replies: 3
    Last Post: November 3rd, 2003, 06:44 AM
  4. Need: Search That Can Return Inversions of User Input
    By JBurke in forum ASP Development
    Replies: 12
    Last Post: September 26th, 2003, 02:01 PM
  5. Need: Search That Can Return Inversions of User Input
    By JBurke in forum ASP Development
    Replies: 0
    Last Post: September 24th, 2003, 11:30 AM

IMN logo majestic logo threadwatch logo seochat tools logo