| Author |
Compare 2 Resultsets
|
smitha verghese
Ranch Hand
Joined: Jun 21, 2003
Posts: 42
|
|
Hi, May i know whether we can compare 2 ResultSets rs1=rs2 ??? Pls let me know! Thanks in advance regards smitha
|
 |
Lasse Koskela
author
Sheriff
Joined: Jan 23, 2002
Posts: 11962
|
|
|
You can't because the java.sql.ResultSet interface doesn't specify a method for testing the equality. You'll have to resort to manual comparison (unless you know that your JDBC driver's ResultSet implementation overrides the equals() method, which is highly unlikely).
|
Author of Test Driven (2007) and Effective Unit Testing (2013) [Blog] [HowToAskQuestionsOnJavaRanch]
|
 |
smitha verghese
Ranch Hand
Joined: Jun 21, 2003
Posts: 42
|
|
Hi Thanks a lot for ur reply regards Smitha (Smile)
|
 |
 |
|
|
subject: Compare 2 Resultsets
|
|
|