Skip to Main Content

Java and JavaScript in the Database

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

checking for null in recordset

96429Dec 6 2004 — edited Dec 21 2004
Hi,

I'm trying to determine if a field contains a null from a recordset declared in Java.

My code is: (rs is the recordset object)

if (rs.getString(2).equalsIgnoreCase("null"))
--other stuff

It dies on this statement when testing for null, which is obviously wrong.

I just can't find the syntax to test for nulls.

Any help would be appreciated.

Regards,

Med
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Jan 18 2005
Added on Dec 6 2004
4 comments
1,004 views