retrieving resultset of unknow column size
Posted on 2002-07-22
i'm creating a web page which displays results for a given query. The thing is that the query will be entered in a free form field so I have no knowledge how many columns are going to be retrieved from the query.
i wouldn't now if the query is:
select name, last_name from user_table ( returns two columns)
select name from user_table (returns on column)
The question is: how do I retrieve the column names of the resultset? or maybe just how many columns there are.
I basically need to be able to retrieve the data using say rs.getObject("someName"); and display them.