Ver Mensaje Individual
  #2 (permalink)  
Antiguo 20/03/2009, 06:35
Avatar de Adler
Adler
Colaborador
 
Fecha de Ingreso: diciembre-2006
Mensajes: 4.671
Antigüedad: 18 años, 4 meses
Puntos: 126
Respuesta: Obtener el Nro Columnas y sus nombres - MS.Access-->ASP

Hola

¿Podría ser algo como esto?

Código asp:
Ver original
  1. SQL="Select campos FROM tabla"
  2. RS.Open SQL, Conn,3,1
  3. %>
  4. <table border="1"><tr>
  5. <%
  6. for i = 0 to RS.fields.Count - 1
  7. %>
  8. <td><%=RS.fields(i).name%></td>
  9. <%
  10. next
  11. %>
  12. </tr>
  13. <%
  14. do while not RS.eof
  15. %>
  16. <tr>
  17. <%
  18. for i = 0 to RS.fields.Count - 1
  19. %>
  20. <td><%=RS.fields(i)%></td>
  21. <%
  22. next
  23. %>
  24. </tr>
  25. <%
  26. RS.movenext
  27. Loop
  28. RS.Close
  29. Set RS = Nothing
  30. Conn.Close
  31. Set Conn = Nothing
  32. %>
  33. </table>

Suerte
__________________
Los formularios se envían/validan con un botón Submit
<input type="submit" value="Enviar" style="background-color:#0B5795; font:bold 10px verdana; color:#FFF;" />