Retrieving text from database and writing back as url

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.


 Subscribe in a reader

Go Back   Webforumz.com > Main Forums > Program Your Website > Classic ASP

Notices




Closed Thread
 
LinkBack Thread Tools
  #1  
Old Dec 14th, 2004, 13:17
Junior Member
Join Date: Mar 2004
Location: United Kingdom
Posts: 19
Thanks: 0
Thanked 0 Times in 0 Posts
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
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!

  #2  
Old Dec 14th, 2004, 13:57
Junior Member
Join Date: Oct 2004
Location: USA
Posts: 17
Thanks: 0
Thanked 0 Times in 0 Posts
I'm assuming you have a recordset named rstSearch for this...
Code: Select all
<%
response.write("Fees: 2005-2006")
%>
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
  #3  
Old Dec 14th, 2004, 14:11
Junior Member
Join Date: Mar 2004
Location: United Kingdom
Posts: 19
Thanks: 0
Thanked 0 Times in 0 Posts
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),
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
  #4  
Old Dec 15th, 2004, 09:03
Highly Reputable Member
Join Date: Jul 2003
Location: Ipswich, UK
Posts: 690
Thanks: 0
Thanked 0 Times in 0 Posts
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?
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
  #5  
Old Dec 16th, 2004, 12:52
Junior Member
Join Date: Mar 2004
Location: United Kingdom
Posts: 19
Thanks: 0
Thanked 0 Times in 0 Posts
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!
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
  #6  
Old Dec 22nd, 2004, 11:36
Rob's Avatar
Rob Rob is offline
Webforumz Founder
Join Date: Jul 2003
Location: Southern UK
Age: 34
Posts: 3,186
Blog Entries: 7
Thanks: 27
Thanked 23 Times in 20 Posts
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.
__________________
Click the 'Thanks!' button if this post has helped you

Rob - Webforumz Founder
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Closed Thread

Tags
retrieving, text, database, writing, url

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

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


All times are GMT. The time now is 03:22.


Powered by vBulletin®
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Search Engine Optimization by vBSEO 3.2.0 RC8
© 2003-2008 Webforumz.com : All Rights Reserved

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42