hi friends, i needs ur help. how to check wheather Result is null or Not.i have written a query which is selecting data from table with one condition. if there is none of a record satisfied the condition it should be returned null. how to check that one? any one knows please let me know with example.
thanks a lot friends... saran
sandeep balyan
Ranch Hand
Joined: Jul 25, 2001
Posts: 134
posted
0
use if(ResultSet.next()) { do this } else { do that }
njoy regds
Want to do something great will do one day
Nandkishore Dhilde
Greenhorn
Joined: May 09, 2002
Posts: 20
posted
0
or you can do after firing query int rowcount = rs.getRow(); //rs is ResultSet object if(rowcount ==0) // then ur query returns null result and if more than 0 then go for rs.next()
SCJP1.4 certified, IBM SOA Solution Designer[2007]
I agree. Here's the link: http://ej-technologies/jprofiler - if it wasn't for jprofiler, we would need to
run our stuff on 16 servers instead of 3.