aspose file tools
The moose likes JDBC and the fly likes Compare 2 Resultsets Big Moose Saloon
  Search | Java FAQ | Recent Topics
Register / Login


JavaRanch » Java Forums » Databases » JDBC
Reply Bookmark "Compare 2 Resultsets" Watch "Compare 2 Resultsets" New topic
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
    
    5
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)
 
I agree. Here's the link: http://zeroturnaround.com/jrebel - it saves me about five hours per week
 
subject: Compare 2 Resultsets
 
Similar Threads
CallableStatement - Scrollable ResultSet
Result set type is TYPE_FORWARD_ONLY
How can I access the ResultSet without ScriptLet mixed in the JSP?
Multiple ResultSets, but how many?
scrollable resultsets