Subject Re: [Firebird-Java] Check fields for DB null
Author Blas Rodriguez Somoza
Hello

If what you get from the ResultSet is an Object, like String or Date,
then you get null object when the field is null.

When the value is a primitive (int, float etc) then there are a method
in ResultSet to check if the last value you get from the ResultSet was null.

boolean java.sql.ResultSet.wasNull();

Check the jdk documentation.

Regards
Blas Rodriguez Somoza.

----- Original Message -----
From: "Christian Flaig" <christian.flaig@...>
To: "Firebird-java" <Firebird-Java@yahoogroups.com>
Sent: Wednesday, September 04, 2002 7:58 PM
Subject: [Firebird-Java] Check fields for DB null


> Hello,
>
> we are using the firebird-jdbc for four weeks now, and it is working well.
>
> But there is one question: how can I check if a field is null in the
> database?
>
> Something like ... rs.getString(...).isNull !?!
>
> Thanks in advance.
>
> Christian
>
>
>
> To unsubscribe from this group, send an email to:
> Firebird-Java-unsubscribe@yahoogroups.com
>
>
>
> Your use of Yahoo! Groups is subject to http://docs.yahoo.com/info/terms/
>
>
>