I have a recordset. I want to know how many fields are there in my recordset. How do I do that?<BR><BR>Thanks.
rs.RecordCount give that number... you have to change your cursor type for this to work or else it will return a -1... there is an article or two about that on this site somewhere.<BR>
recordset.Count .... try that dude
Ubound (RS.Fields) ???? <BR><BR>just a logical thought because Fields is an array and UBound gets the highest element in the array... <BR><BR>Jason<BR>http://www.jasontconnell.com
That give the number of records in a record set. Can't you see in your database how many fields there are?
my program runs the query given by users. <BR>So I would like to know how many fields in the result recordset.
I tried this. There is no property as "count" for recordset object. Any ideas?<BR><BR>Thx<BR>
I tried this also. That gives me an error <BR><BR>"Wrong number of arguments or invalid property assignment."<BR><BR>Any more ideas?<BR><BR>Thx
I got it. <BR><BR>For each field in recordset.fields<BR>count = count + 1<BR>next<BR><BR>"count" gives me the number of fields in recordset.<BR><BR>Thanks<BR><BR><BR><BR><BR>
you know, i actually did it that way for me! i forget things at the most convenient times...<BR><BR>Jason<BR>http://www.jasontconnell.com