Forums

This topic is locked

Image URL's from access database

Posted 16 Jun 2002 07:54:32
1
has voted
16 Jun 2002 07:54:32 Chris Mr. posted:
I asked this already but the answer didnt work. Or atleast I missing something.

I am using an access database and I am storing URL's to images in database fields. I want to be able to retrieve the field url as an image in the page and not "/images/thisimage.jpg" like its doing now.

I guess I'm trying to make the web page render data as HTML and not just text. Any ideas? When I select "Server.EncodeHtml" it does nothing different. It's an easy fix but I just can't figure it out.

Thanks

GrillCheese

Replies

Replied 16 Jun 2002 07:57:49
16 Jun 2002 07:57:49 Jeremy Conn replied:
It is simpler than what you are doing...

Simply select 'Insert Image' from the Object Panel, then select 'Data Source' at the top of the next section. Select which DB section you want to grab from, and UD will do the rest.


(UD4|IIS5|WXP|ASP)
*Connman21*
www.conncreativemedia.com
Replied 16 Jun 2002 08:02:59
16 Jun 2002 08:02:59 Chris Mr. replied:
Thanks That did it. What if I have a field that has HTML in it? How do I retrieve that so it formats using the HTML and doesn't print the <BR>'s etc.?



GrillCheese
Replied 16 Jun 2002 10:16:35
16 Jun 2002 10:16:35 Owen Eastwick replied:
If you have some HTML in a text field within your database it will be treated as HTML when the data is rtreived and displayed on the page.

Regards

Owen.

Multiple Parameter UD4 / Access 2000 Database Search Tutorial:
www.tdsf.co.uk/tdsfdemo
Replied 16 Jun 2002 18:54:50
16 Jun 2002 18:54:50 Chris Mr. replied:
Well I must be doing something wrong. In the field I'm including a few <BR>'s and when I retrieve the data into a page it doesnt do Linebreaks but instead prints <BR>'s.

Do I need to do anything special in the Access database to label the field as HTML?

GrillCheese
Replied 17 Jun 2002 10:09:52
17 Jun 2002 10:09:52 Vince Baker replied:
You do not need to format the database for what you are doing....

As long as you correctly specify the data source from the page and ensure that you add the image folder path infront of the code in the datasource everything else should work.....

Replied 17 Jun 2002 17:53:01
17 Jun 2002 17:53:01 Jeremy Conn replied:
When you add data bindings to a page, UD should automatically make them HTML ready...

If you aren't getting those results - How are you adding these to the page?

Try this: In the Data Bindings box, find the Item that you are wanting to be shown as HTML - Then move over to the right and find the 'Format' heading - press the pulldown and select "Server.HTMLEncode"... that should do the trick.


(DWMX|IIS5|WXP|ASP/VB)
*Connman21*
www.conncreativemedia.com

Reply to this topic