Notices

Great community. Great ideas.

Welcome to ASP/Free, a community dedicated to helping beginners and professionals alike in improving their knowledge of Microsoft's development and administration technologies. Sign up today to gain access to the combined insight of tens of thousands of members.

Thread: ADO Fields Collection - Name and Type showing empty

Results 1 to 1 of 1
Share This Thread →
  1. #1
    badasafish is offline Contributing User
    Join Date
    Oct 2006
    Posts
    250
    Rep Power
    12

    ADO Fields Collection - Name and Type showing empty

    Update: Not sure exactly what was causing the problem, but when I turned on Option Explicit and resolved any issues I ended up with a working code. Since this is of little use to anyone I suggest an Admin kindly delete this post.
    Many thanks.


    Hi all

    I have a strange problem that I hope you can assist me with. I'm looping through a recordset looking at the fieldnames and types as follows:

    Code:
    		DIM fieldsCount
    		fieldsCount = rs_access.Fields.Count 
    		
    		For i_count = 0 To fieldsCount - 1
    			tempType = rs_access.Fields(i_count).Type
    			tempName = rs_access.Fields(i_count).Name
    		Next
    As a standalone .asp file this works fine, but when I attempt to use it via a server side include the Fields.Type and Fields.Name always come back as nothing. There is definitely a resultset as I can debug and see the fields count is correct, and if I add a test to the for loop to retrieve a specific field, i.e. rs_access("fieldname") I get the data displayed.

    Any ideas?

    Thanks, Stephen
    Last edited by badasafish; November 21st, 2012 at 11:09 AM. Reason: Fixed

Share This Thread →

Become Part of This Conversation

Join NowFor Free!

Similar Threads

  1. Replies: 11
    Last Post: April 2nd, 2009, 08:28 AM
  2. Request.Form collection returns empty
    By Nilpo in forum ASP Development
    Replies: 13
    Last Post: January 9th, 2009, 06:01 PM
  3. Replies: 2
    Last Post: November 30th, 2005, 07:06 AM
  4. How to stop a field in a query showing if it is empty
    By cazlj in forum Microsoft Access Help
    Replies: 2
    Last Post: January 10th, 2005, 08:18 AM
  5. Replies: 2
    Last Post: September 15th, 2004, 05:32 PM

ASP Free Advertisers and Affiliates