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
5201
December 11, 2005 08:50AM
2124
December 12, 2005 04:35AM
1981
December 12, 2005 07:23AM
1985
December 12, 2005 07:28AM
1849
December 12, 2005 05:06PM
1793
December 12, 2005 07:50PM
1707
December 13, 2005 04:42AM
Re: How to return null/empty resultset from SP??
3204
December 13, 2005 06:29AM
2461
December 13, 2005 07:39AM
1799
December 13, 2005 08:08AM
1676
December 13, 2005 03:18PM
1739
December 13, 2005 07:54PM
1776
December 15, 2005 06:04AM
1632
December 15, 2005 10:07AM
2050
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.