View Single Post
  #1 (permalink)  
Old Oct 4th, 2007, 12:15
stroodle01 stroodle01 is offline
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..
Reply With Quote