Re: How to return null/empty resultset from SP??
Posted by:
Ming Yeung
Date: December 13, 2005 06:29AM
I have a question.
Let say [ret_id] is null, and the SP returns [ret_id] with a null.
e.g.)
...
SET ret_id = NULL;
SELECT ret_id;
...
Is the resultset empty? or it contains the [ret_id] which is null?
If the resultset returns the parameter of [ret_id] which has a NULL value...then I understand why the following statement is always true...because the resultset is not empty....
if (rs.next()) { ... this is always true
...rs.getInt("ret_id"); <--- always convert to ZERO by default if it is NULL.
}
If the above is correct, then how do I actually an empty resultset?
Thanks pem!
Edited 1 time(s). Last edit at 12/13/2005 06:34AM by Ming Yeung.
Subject
Views
Written By
Posted
5425
December 11, 2005 08:50AM
2241
December 12, 2005 04:35AM
2067
December 12, 2005 07:23AM
2076
December 12, 2005 07:28AM
1937
December 12, 2005 05:06PM
1888
December 12, 2005 07:50PM
1793
December 13, 2005 04:42AM
Re: How to return null/empty resultset from SP??
3326
December 13, 2005 06:29AM
2662
December 13, 2005 07:39AM
1904
December 13, 2005 08:08AM
1767
December 13, 2005 03:18PM
1823
December 13, 2005 07:54PM
1869
December 15, 2005 06:04AM
1742
December 15, 2005 10:07AM
2132
January 15, 2006 11:50AM
Sorry, you can't reply to this topic. It has been closed.
Content reproduced on this site is the property of the respective copyright holders.
It is not reviewed in advance by Oracle and does not necessarily represent the opinion
of Oracle or any other party.