Subject | Re: [Firebird-Java] How to get column names as first row? (or why I would need ResultSet.first() and ResultSet.previous()) |
---|---|
Author | Mark Rotteveel |
Post date | 2010-08-19T09:00:01Z |
On 18-8-2010 23:10, Yves Glodt wrote:
from the returned ResultSetMetaData object.
Mark
--
Mark Rotteveel
> Hi,Use the resultset metadata (getMetaData()) and retrieve the columnnames
>
> I have a case where I iterate over a resultset, and I want to print out the
> column names as first row.
>
> All this should be fast, so I do not want to call
> PreparedStatement.executeQuery twice.
>
> So I was thinking to call resultset.next once, iterate of the columns to get
> the names, then "rewind" the resultset, and iterate over it completely to
> get the actual data.
> Unfortunately this does not work since the calls ResultSet.first() and
> ResultSet.previous() are "not yet implemented"
>
> Anyone got another idea how I can do what I need to do? Btw this is using
> jaybird 2.1.6 on firebird 1.5.
from the returned ResultSetMetaData object.
Mark
--
Mark Rotteveel