Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Hyperlink to display more records 1

Status
Not open for further replies.

kapplersvictory

Programmer
Mar 17, 2003
15
ZA
Hi there, forgive me if the question is already been answered.


Here is the table I am working on, 21 columns

ID
Coord
N-town
Area
Crop_type
.....
....



I can correctly display all records from the table but it gets hard to format it on screen and definitely messy.
How do I go if I want to display just the N-town list and then have a hyperlink on it in order to click and diplay the rest onf information.

Any suggestion, reading, links etc is welcome.

Thank you


Kappler

I had a cool footer but the webmaster told me to remove it! America is the land of freedom...
 
Assuming you have the connection (adoConn) to the database set up, create a recordset called rs:

Set rs = Server.CreateObject("ADODB.Recorset")
Set rs.ActiveConnection = adoConn
rs.CursorType = adOpenForwardOnly
rs.LockType = adLockReadOnly
rs.Source = "SELECT [ID], [N-town] FROM tbl_your_table"
rs.Open
While Not rs.EOF
Response.Write &quot;<a href=&quot;&quot;newpage.asp?ID=&quot; & rs.Fields(&quot;ID&quot;).Value & &quot;&quot;&quot;>&quot; & rs.Fields(&quot;N-town&quot;).Value & &quot;</a>&quot;
rs.MoveNext
Wend
rs.Close
Set rs = Nothing

Then in newpage.asp grab the ID from the querystring and use it to query the db for the full details from that record
 
thanks a lot, I will give it a try and I will tell you.

Bye

Qatqat

I had a cool footer but the webmaster told me to remove it! America is the land of freedom...
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top