I am running the following code to an access database ' Recordset Object Dim rs ' connecting to database con.Open connStr ' executing stored procedure Set rs = con.Execute ("exec SpotDesc") ' showing all records While Not rs.EOF Response.Write rs(0) & " " & rs(1) & "<br>" rs.MoveNext Wend ' closing connection and freeing resources con.Close Set rs = Nothing Code (markup): This works and runs the stored procedure SpotDesc. One question I have is that this line brings back the results Response.Write rs(0) & " " & rs(1) & "<br>" but requires me to know how many colums are being returned, ie rs(0) is column 1 and rs(1) is column 2 Is there a way of writing this line and it places all the columns there wheter it be 1, 2, or 3? Ie a way of know how many columns are returned... Is there also a way to show the column heading? Thanks
you could run through a loop of the first record and detect if that object exits for x = 0 to ubound rs, detect if rs(x) is nothing. Their has to be a way in classic - I know it asp.net you can detect count of rows and columns so i bet if you dig deep enough, you shall find the count property
Hi I guess there is a fields collection for recordset object, the fields should have a count propety.from that property i think you can find the no of columns it returning.