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
5422
December 11, 2005 08:50AM
2239
December 12, 2005 04:35AM
2066
December 12, 2005 07:23AM
2074
December 12, 2005 07:28AM
1935
December 12, 2005 05:06PM
1882
December 12, 2005 07:50PM
1791
December 13, 2005 04:42AM
Re: How to return null/empty resultset from SP??
3323
December 13, 2005 06:29AM
2658
December 13, 2005 07:39AM
1902
December 13, 2005 08:08AM
1765
December 13, 2005 03:18PM
1822
December 13, 2005 07:54PM
1868
December 15, 2005 06:04AM
1740
December 15, 2005 10:07AM
2131
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.