×
INTELLIGENT WORK FORUMS
FOR COMPUTER PROFESSIONALS

Contact US

Log In

Come Join Us!

Are you a
Computer / IT professional?
Join Tek-Tips Forums!
  • Talk With Other Members
  • Be Notified Of Responses
    To Your Posts
  • Keyword Search
  • One-Click Access To Your
    Favorite Forums
  • Automated Signatures
    On Your Posts
  • Best Of All, It's Free!

*Tek-Tips's functionality depends on members receiving e-mail. By joining you are opting in to receive e-mail.

Posting Guidelines

Promoting, selling, recruiting, coursework and thesis posting is forbidden.

Students Click Here

Please help with the correct syntax to retrieve a picture file

Please help with the correct syntax to retrieve a picture file

Please help with the correct syntax to retrieve a picture file

(OP)
I am using FrontPage 2002 and MSSql 2000.

I am storing the following value: images/71A2030500D.jpg in a Sql column named: Image and retrieving it using the code: <%=FP_FieldLink(fp_rs,"Image")%> This works fine.

I would like to store the following value: 71A2030500D in a Sql column named: Image and retrieve it using the code: <%=FP_FieldLink(fp_rs,Images/"Image".jpg)%> but the syntax is not correct. Can anyone please help me with the correct syntax ? Thank you very much.

RE: Please help with the correct syntax to retrieve a picture file

Vamoose,

I use FP 2003 and 2002, and I have done exactly what you are doing, but your syntax is messed up because you are trying to rename the record source and you can't do that or FP will freak out (as it did).

<%=FP_FieldLink(fp_rs,"Image")%>  Calls your fp_rs (Front Page Record Source) the field in your DB.

I would try what you have, but take of the file extension .jpg and see if that works. If not, I am afraid you may have to leave your DB the way it is. I have my DB's setup with the "image/" prefix in front of the file names in the fields.

Is there a specific reason you need to leave of the "image/" prefix?

Hope this helps.

DBigger

RE: Please help with the correct syntax to retrieve a picture file

(OP)
I have been searching the net for the past couple days now and this is what I have come up with. The reason I am trying to do this is because I want only the picture name stored in the SQL database, the prefix of "images/" and suffix of ".jpg" have been removed. This allows me to store only the text of "71A2030500D" in the SQL table column named "Image". I have found that the following code works quite well to assemble this text back together and display the correct picture.

images/<%=FP_FieldLink(fp_rs,"Image")%>.jpg

I truly hope this code will help someone out as you have all helped me. Thanks for your support. Have a STAR on me.

Red Flag This Post

Please let us know here why this post is inappropriate. Reasons such as off-topic, duplicates, flames, illegal, vulgar, or students posting their homework.

Red Flag Submitted

Thank you for helping keep Tek-Tips Forums free from inappropriate posts.
The Tek-Tips staff will check this out and take appropriate action.

Reply To This Thread

Posting in the Tek-Tips forums is a member-only feature.

Click Here to join Tek-Tips and talk with other members! Already a Member? Login


Close Box

Join Tek-Tips® Today!

Join your peers on the Internet's largest technical computer professional community.
It's easy to join and it's free.

Here's Why Members Love Tek-Tips Forums:

Register now while it's still free!

Already a member? Close this window and log in.

Join Us             Close