Tycoon Talk
Become a Big fish!
The number 1 forum for online business!
Post topics, ask questions, share your knowledge.
Tycoon Talk is part of Freelancer.com - find skilled workers online at a fraction of the cost.

ASP.NET Forum


You are currently viewing our ASP.NET Forum as a guest. Please register to participate.
Login



Reply
ASP/SQL HELP PLEASE!!!!
Old 02-27-2006, 12:12 PM ASP/SQL HELP PLEASE!!!!
Junior Talker

Posts: 1
Trades: 0
Hi I am a university student and am having some major problems with asp and sql for my final year project I have 3 weeks to finish it and am very stuck.

does anyone know how to write the code to call a hyper link from a database this may seem pretty simple to some but its like brain surgery to me if anyone can help me I would be very greatful

thanks

carl
carlosdurrantos is offline
Reply With Quote
View Public Profile
 
 
Register now for full access!
Old 02-27-2006, 12:52 PM Re: ASP/SQL HELP PLEASE!!!!
chrishirst's Avatar
Missing! presumed drunk.

Posts: 41,517
Name: Chris Hirst
Location: Blackpool. UK
Trades: 0
response.write "<a href=" & chr(34) & "url" & chr(34) & ">Anchor text</a>"

or did you mean something else ???
__________________
Chris. ->> Links are advertising NOT optimising!! <<-
A foolish consistency is the hobgoblin of little minds
Thought for today:- I SEO the only industry where all the cowboys are Indians?
chrishirst is offline
Reply With Quote
View Public Profile Visit chrishirst's homepage!
 
Old 03-04-2006, 10:21 PM Re: ASP/SQL HELP PLEASE!!!!
Super Talker

Posts: 144
Trades: 0
well, assuming you are using ADO, here's an example to pull links and link text from a table containing links. we'll call it the [links_table], and we'll order the results in ABC order ascending

Code:
<%
 on error resume next
 
 dim conn, rs
 set conn = server.createobject("adodb.connection")
 
 if err.number <> 0 then
   ' error while opening connection, redirect to error.asp and display message
   set conn = nothing
   response.redirect "error.asp?error="& escape(err.description)
 end if
 
 conn.cursorLocation = 3   ' so we have access to connection.recordCount
 conn.open dsnConnection
 
 set rs = conn.execute("SELECT link_text, url FROM links_table ORDER BY link_text ASC")
 do while not rs.eof
   response.write "<a href="""& rs("url") &""">"& rs("link_text") &"</a><br>"
   rs.moveNext
 loop
 
 conn.close
 set conn = nothing
 set rs = nothing
%>
createvibe.com is offline
Reply With Quote
View Public Profile Visit createvibe.com's homepage!
 
Reply     « Reply to ASP/SQL HELP PLEASE!!!!
 

Thread Tools Search this Thread
Search this Thread:

Advanced Search

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 Off
Pingbacks are Off
Refbacks are Off





   
RSS Feed  Feeds: RSS   JS   XML
RSS Feed  Feeds for this forum: RSS   JS   XML



Page generated in 0.17501 seconds with 12 queries