This is a discussion on "Retrieving text from database and writing back as url" within the Classic ASP section. This forum, and the thread "Retrieving text from database and writing back as url are both part of the Program Your Website category.
|
|
|
|
|
![]() |
||
Retrieving text from database and writing back as url
|
||
| Notices |
![]() |
|
|
LinkBack | Thread Tools |
|
|||
|
Retrieving text from database and writing back as url
Hi I am very new to this - I am trying to retrieve data stored in a text field of an access database then response write it as a url that links. How do I code this?
These are my pathetic attempts: <% Response.Write "">Fees: 2005 - 2006"%> or ">Fees 2005 - 2006 Cringe - like I say I am a bit green around the gills |
|
|
|
|||
|
I'm assuming you have a recordset named rstSearch for this...
|
|
|||
|
Yes - I have just solved the problem by coding html into the database field, ie.
Fees 2005-2006 (in my access database) then in the detail.asp page coded: <%= rstSearch.Fields("int_student_fees")& "" %> but please let me know if there is another way (or the correct way should I say), |
|
|||
|
That is definately the wrong way to do it, if you need to use that data anywhere else you might have a problem because it is surrounded by html tags and therefore will not display correctly.
Your second attempt or da_stimulator's suggestion should have worked perfectly? |
|
|||
|
Thank you Smokie and da_stimulator - I have now had time to go back and correct everything according to da_stimulator's code.
All works marvellously! |
|
||||
|
Never put MARKUP in a database unless absolutly nessesary.
These forum posts for instance are stored as markup because there is not really another way to do it, unless we switch to plain text. All other info on this site has markup applied to it AFTER being retrieved from the database.
__________________
Rob - SEO Specialist Owner & Founder of Webforumz.com I am currently unavailable for private work
Last Blog Entry: Creative Labs threaten developer over home made drivers.... (Apr 1st, 2008)
|
![]() |
| Tags |
| retrieving, text, database, writing, url |
| Thread Tools | |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Problem with my Servlet - retrieving images from database | Love2Java | Other Programming Languages | 2 | May 27th, 2008 17:15 |
| Shorten Length of Database Text Displayed? | rgrimes | JavaScript Forum | 2 | Oct 11th, 2006 15:38 |
| Text Animation - Writing / Painting Effect | beso | Flash & Multimedia Forum | 5 | Sep 26th, 2006 23:31 |
| Writing to a text file | Gurpreet82 | Classic ASP | 0 | Mar 15th, 2006 15:57 |
| still having problems writing to database... | benbacardi | Classic ASP | 9 | Aug 26th, 2004 16:20 |