Results 1 to 3 of 3
  1. #1
    5 Star Lounger
    Join Date
    Jan 2001
    Location
    austin, Texas, USA
    Posts
    1,029
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Finding Number of Columns in a recordset (Access 2K, Win2KPro)

    Hope this is easy. I have some ASP written to open a recordset in Access and need to load 2 variables: the number of rows in the recordset and the number of columns. rs.RecordCount works fine for the rows but is there a similar command for the number of columns? Currently I do a loop and that works but if I can load the field count more directly I'll just plain feel better. <img src=/S/grin.gif border=0 alt=grin width=15 height=15>

  2. #2
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 29 Times in 29 Posts

    Re: Finding Number of Columns in a recordset (Access 2K, Win2KPro)

    Try rs.Fields.Count.

  3. #3
    5 Star Lounger
    Join Date
    Jan 2001
    Location
    austin, Texas, USA
    Posts
    1,029
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Finding Number of Columns in a recordset (Access 2K, Win2KPro)

    yup, that worked. strangely enough, I tried this earlier but something was off somewhere as it didn't work. thanks, tho! <img src=/S/cheers.gif border=0 alt=cheers width=30 height=16>

Posting Permissions

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