Subject Re: [Firebird-Java] TYPE_FORWARD_ONLY error in select
Author Roman Rokytskyy
Hi,

> I'm new to Jaybird, just trying to get a simple "select * from
> table;" going. I receive the following error:
>
> Result set is TYPE_FORWARD_ONLY
> Error Code: 0
> SQL State: HYC00
>
> Do I need to initialize my driver to use
> ResultSet.TYPE_SCROLL_INSENSITIVE?

By default result set is constructred as TYPE_FORWARD_ONLY. If you try to
use ResultSet.first()/absolute()/etc methods (all navigation methods except
next()), you will get this exception. There is no possibility to tell driver
to use TYPE_SCROLL_INSENSITIVE cursor by default, you have to use
appropriate Connection.createStatement(...) or
Connection.prepareStatement(...) method.

Roman