|
|
|||||||||
|
|||||||||
|
|||||||||
| |
||
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
#1
|
|||
|
|||
|
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 |  Bbb |  ccc |  ddd |  eee |  fff |  ggg| a1 | b2 | c2   | d2   | e2  | f2  | g2  | but when i wanna retrieve it this way aaa   a1 bbb   b2 ccc   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. |
|
#2
|
|||
|
|||
|
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 |
|
#3
|
|||
|
|||
|
hi./.... wad if i need to add in new headerS? how do i do usingSQL statmentS? like INSERT or wad? thanks in advance
|
|
#4
|
|||
|
|||
|
what if you wrote in proper English?
|
![]() |
| Viewing: ASP Free Forums > Database > SQL Development > retrieving table headers? |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|