Regards
Azrael Noor
K. Tsang CEng MBCS PMP PMI-ACP OCMJEA OCPJP
Azrael Noor wrote:
is there any technical difference or some sort of standard difference which one must follow?
Which of above two approach is fine?
The quieter you are, the more you are able to hear.
K. Tsang wrote:Hello
The whole idea is that if the result set has no records, it will exit the while loop.
Your current approach is somewhat making the logic more complicated and difficult to understand.
Hope this helps.
Regards
Azrael Noor
Azrael Noor wrote:My current approach is
"Leadership is nature's way of removing morons from the productive flow" - Dogbert
Articles by Winston can be found here
Winston Gutkowski wrote:
Azrael Noor wrote:My current approach is
Which doesn't help us much, because your checkRequestExist() method doesn't actually call myfunc().
My suggestion would be to back up and explain, in English, what you're trying to do.
ResultSet is an awkward beast, mainly because you have no direct access to a row.
It also doesn't have a hasNext() method, which in my view is criminal after all this time; and if that's what you're trying to emulate, the answer is: you probably can't (or if you do it will be very tortuous), just as you can't determine the size of a ResultSet without reading it.
Winston
Regards
Azrael Noor
Returns:
true if the new current row is valid; false if there are no more rows
The quieter you are, the more you are able to hear.
Regards
Azrael Noor
The quieter you are, the more you are able to hear.
Regards
Azrael Noor
Azrael Noor wrote:> There is main Service Class.....
> It checks how many requests in Database.....
> it fetches out 10 requests from database
> it send data coming from database into a function which do further processing
To check how many request there in database there is checkRequestExist() function in a CLASS custom, it returns the resultset
hope it clarifies a bit
"Leadership is nature's way of removing morons from the productive flow" - Dogbert
Articles by Winston can be found here
Why does your bag say "bombs"? The reason I ask is that my bag says "tiny ads" and it has stuff like this:
Gift giving made easy with the permaculture playing cards
https://coderanch.com/t/777758/Gift-giving-easy-permaculture-playing
|