Reading column names

Results 1 to 2 of 2

Thread: Reading column names

  1. #1
    Join Date
    Dec 1969

    Default Reading column names

    How do I read the column names from a table in an access database? I need to go through all the columns in each record without having to tell the script the name of each column. The database frequently has columns added and deleted.<BR><BR>Thank You!

  2. #2
    Ed Guest

    Default RE: Reading column names

    Grab a Recordset object and loop through it like this:<BR><BR>&#039Assumes you have a populated ADO Recordset object named objRS<BR>Dim objField<BR>For Each objField in objRS.Fields<BR> Response.Write "Column Name/Value = " & objField.Name & " / " & objField.Value<BR>Next<BR><BR>There ya go!

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts