Wrox Programmer Forums
|
Classic ASP Databases Discuss using ASP 3 to work with data in databases, including ASP Database Setup issues from the old P2P forum on this specific subtopic. See also the book forum Beginning ASP.NET Databases for questions specific to that book. NOT for ASP.NET 1.0, 1.1, or 2.0.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the Classic ASP Databases section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old August 9th, 2005, 07:38 AM
Authorized User
 
Join Date: Aug 2005
Posts: 10
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via MSN to abhisheksud Send a message via Yahoo to abhisheksud
Default Create Hyperlinks From Database Data

Hi there
I have made a querry page which shows the various tables stored in the database. each table conatins different data but under the same field Names. How ever the querry is such designed that it displays the table name as the querry result. Now what i want is that wen i click the table name it should display the data stored in them. altough i am able to create the hyperlink on them but not able to program the link that it displays the end result. the code which i have used is given below.


objrs1.Open "Select * from Menu where Center = '"&center&"' and Month = '"&mon&"'",objconn2
for each x in objrs1.Fields
Response.Write "<th>" & x.name &"</th>"
next%>
<tr>
<%
do while not objrs1.EOF
%>
<td><a href ="#">
<% Response.Write objrs1("NCNumber") %></td></a>
<%
Response.Write "<td>" & objrs1("Center") & "</td>"
Response.Write "<td>" & objrs1("Month") & "</td>"
objrs1.MoveNext
endo =true
loop
%>


how can i program this href link to display the NCNumber table stored in another database

Thanks
 
Old August 9th, 2005, 07:58 AM
Friend of Wrox
 
Join Date: May 2003
Posts: 229
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Something like this

<a href="displaytable.asp?id=<%Response.Write objrs1(("NCNumber"))%>">

and then on request page, get the querystring and display the table based on that..

Charul Shukla
 
Old August 9th, 2005, 03:38 PM
Friend of Wrox
 
Join Date: Jun 2003
Posts: 2,480
Thanks: 0
Thanked 1 Time in 1 Post
Default

Where is that you are trying to take the user on click of that link?
Code:
<td>
    <a href ="URL_or_#Name_to_Where_the_User_should_be_directed"><%=objrs1("NCNumber")%></a>
</td>
Hope that helps.
Cheers!

_________________________
- Vijay G
Strive for Perfection





Similar Threads
Thread Thread Starter Forum Replies Last Post
How to create a Database koushikroy2001 SQL Language 2 January 4th, 2006 04:03 AM
dynamic search, images from database , hyperlinks ishh_sh VB How-To 0 December 15th, 2004 08:10 AM
Create database Yee MySQL 2 November 5th, 2004 06:14 AM
ASP Form to Database to HTML Hyperlinks remnatch Access ASP 1 August 9th, 2004 10:38 PM
How to create a new database? gpc Classic ASP Databases 17 December 19th, 2003 10:24 AM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.