SQL Development
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
 
 
User Name:
Password:
Remember me
Go Back   ASP Free ForumsDatabaseSQL Development

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Rate Thread Display Modes
 
Unread ASP Free Forums Sponsor:
  #1  
Old November 3rd, 2003, 10:39 PM
shawnleong shawnleong is offline
Registered User
ASP Free Newbie (0 - 499 posts)
 
Join Date: Oct 2003
Posts: 19 shawnleong User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 35 m 28 sec
Reputation Power: 0
retrieving table headers?

hi.. i need to retrieve e headers from my table.... and some data.. but don't really know how to explain.. but let me show u e table layout..




aaa |&nbsp Bbb |&nbsp ccc |&nbsp ddd |&nbsp eee |&nbsp fff |&nbsp ggg|
a1&nbsp| b2&nbsp| c2 &nbsp | d2 &nbsp | e2 &nbsp| f2 &nbsp| g2 &nbsp|


but when i wanna retrieve it this way


aaa &nbsp a1
bbb &nbsp b2
ccc &nbsp c2

and so on... and i also need to add in new headers everytime.. so it has to be auto retrieving nt hardcoded.. by e way , i'm using ms access.. thanks

Last edited by shawnleong : November 3rd, 2003 at 10:42 PM.

Reply With Quote
  #2  
Old November 19th, 2003, 09:40 AM
m_lazor m_lazor is offline
Contributing User
ASP Free Newbie (0 - 499 posts)
 
Join Date: Sep 2003
Location: Luxembourg
Posts: 156 m_lazor User rank is Corporal (100 - 500 Reputation Level)m_lazor User rank is Corporal (100 - 500 Reputation Level)m_lazor User rank is Corporal (100 - 500 Reputation Level)m_lazor User rank is Corporal (100 - 500 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 7
Check this out:

<!-------------------------------------------------------------------------------------------------
Table header row
-------------------------------------------------------------------------------------------------->
<%
If NOT rs.EOF Then
rs.MoveFirst
%>
<table width="95%" bgcolor="DEDFDE" border="1" >
<tr>
<%
For Each Fld In rs.Fields
%>
<td><%= Fld.Name %></td>
<%
Next
%>
</tr>

<!-------------------------------------------------------------------------------------------------
Now comes the data
-------------------------------------------------------------------------------------------------->
<%
Do While NOT rs.EOF
%>
<tr>
<%
For I = 0 To rs.Fields.Count - 1
%>
<td><%= rs.Fields(i).value %></td>
<%
Next
%>
</tr>
<%
rs.MoveNext
Loop
%>
end if

Reply With Quote
  #3  
Old November 19th, 2003, 10:27 PM
shawnleong shawnleong is offline
Registered User
ASP Free Newbie (0 - 499 posts)
 
Join Date: Oct 2003
Posts: 19 shawnleong User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 35 m 28 sec
Reputation Power: 0
hi./.... wad if i need to add in new headerS? how do i do usingSQL statmentS? like INSERT or wad? thanks in advance

Reply With Quote
  #4  
Old November 20th, 2003, 04:54 AM
m_lazor m_lazor is offline
Contributing User
ASP Free Newbie (0 - 499 posts)
 
Join Date: Sep 2003
Location: Luxembourg
Posts: 156 m_lazor User rank is Corporal (100 - 500 Reputation Level)m_lazor User rank is Corporal (100 - 500 Reputation Level)m_lazor User rank is Corporal (100 - 500 Reputation Level)m_lazor User rank is Corporal (100 - 500 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 7
what if you wrote in proper English?

Reply With Quote
Reply

Viewing: ASP Free ForumsDatabaseSQL Development > retrieving table headers?


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump


Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 





© 2003-2008 by Developer Shed. All rights reserved. DS Cluster 6 hosted by Hostway
Stay green...Green IT