Displaying relevant field names

This is a discussion on "Displaying relevant field names" within the Classic ASP section. This forum, and the thread "Displaying relevant field names 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




Reply
 
LinkBack Thread Tools
  #1  
Old Oct 4th, 2007, 12:15
New Member
Join Date: Mar 2007
Location: England
Age: 27
Posts: 7
Thanks: 0
Thanked 0 Times in 0 Posts
Question Displaying relevant field names

Hi there!

I would like to know whether it's possible to retrieve the field names, in order to display them in table format within a html page. I would like to dress the table with the cell data together with field names as 'headers' for each column.

Here is a snippet of what i have manages to produce. Currently, it displays all the entries that coincide with thier field names. The inly thing i wish to do now is to display the field names:
HTML: Select all
<html> 
<head> 
<title>date</title> 
</head> 
<body > 
<h3>Try It Out - Sailors Table With a Counter</b></i></font></h3> 

<p><br> 
<% 
Dim oRSeofc 
Set oRSeofc=Server.createObject("ADODB.recordset") 
oRSEOFc.Open "People", "dsn=20527796a" 
oRSeofc.MoveFirst 
response.write "<table border='1'>" 

Dim PersonCounter 
PersonCounter = 0 
Do While Not oRSeofc.EOF 
PersonCounter =PersonCounter + 1 

response.write oRSeofc.fields.item(counter).name 

Response.write "<tr><td>" & PersonCounter & "</td>" 
Response.write "<td>" & oRSeofc("PeopleNameFirst") & "</td>" 
Response.write "<td>" & oRSeofc("PeopleNameLast") & "</td>" 
Response.write "<td>" & oRSeofc("PeopleDOB") & "</td></tr>" 
oRSeofc.MoveNext 
Loop 
response.write "</table><br>" 
response.write PersonCounter & " Sailors in this list" 
%> 


</body> 
</html>
All help will be greatefully appreciated, thanx!!

Last edited by Monie; Oct 26th, 2007 at 09:10. Reason: Inserted the html tag for html code..
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote

  #2  
Old Oct 5th, 2007, 03:26
Most Reputable Member
Join Date: Feb 2004
Location: Borneo
Age: 27
Posts: 1,612
Blog Entries: 2
Thanks: 0
Thanked 4 Times in 3 Posts
Re: Displaying relevant field names

Do you mean displaying all data from your table database?
Last Blog Entry: ASP Programming Tips and Technique (Oct 26th, 2007)
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
  #3  
Old Oct 5th, 2007, 07:11
Most Reputable Member
Join Date: Feb 2004
Location: Borneo
Age: 27
Posts: 1,612
Blog Entries: 2
Thanks: 0
Thanked 4 Times in 3 Posts
Re: Displaying relevant field names

If so, this is a great link that I found today.
It teach you step by step way in creating a simple Add, Edit, Show, Delete function in asp.

It's a great link. [ Here ]
Hope this helps you!
Last Blog Entry: ASP Programming Tips and Technique (Oct 26th, 2007)
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
Reply

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
Creating a "tag" system to find relevant "related" pages MrQuestions PHP Forum 3 Mar 20th, 2008 23:06
Need javascript to set input field value field jdadwilson JavaScript Forum 3 May 9th, 2007 04:47
validate text field to db field jtesolin Classic ASP 1 Jul 18th, 2006 17:48
Odd input field not displaying problem hankhill Classic ASP 1 Jun 26th, 2006 23:11


All times are GMT. The time now is 12:33.


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