Get Field Names
Is there a way to get all field names in a table without returning an entire recordset? This works, but it returns everything which is probably unneccessary:
<%
Dim sSQL
Dim Field
Dim oRS
sSQL = "SELECT * FROM table"
Set oRS=Server.CreateObject("ADODB.RecordSet")
oRS.Open sSQL, "DSN=dbname"
For Each Field in oRS.Fields
Response.Write Field.Name
Next
%>
|