Subject Re: Query returning row when it shouldn't...
Author phil_sorry_trouble_with_profile
--- In firebird-support@yahoogroups.com, "Roman Rokytskyy"
<rrokytskyy@y...> wrote:
>
> > This still doesn't explain why rs.next() should return true because
> > the API reference states that next returns "true if the new current
> > row is valid; false if there are no more rows". So the first call to
> > rs.next() should return false because there are no rows (and this is
> > indeed how it works with SQLserver).
>
> If your SQL Server returns you empty result set, then this pure MS'
> invention. According to the standard it must return NULL, and NULL !=
> <empty>. See
> http://www-db.stanford.edu/~ullman/fcdb/oracle/or-nulls.html for
> example. JDBC driver returns you true in rs.next(), because it has a
> row with a NULL value, not an empty result set.
>
> Roman
That is encouraging but that link is not an official specification?
Anyway I do agree that the SQL should return null, but when done
within Java/JDBC, is this the correct way for the user to get this
result? I wonder if there is a JDBC spec which declares the behaviour.....