Win a copy of Java Mock Exams (software) this week in the Programmer Certification (OCPJP) forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

returning a ResultSet reference ....

 
Madhav Lakkapragada
Ranch Hand
Posts: 5040
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

Hi:
Is it considered good programming tech, to return a
reference to a ResultSet obj. I was going thru some
servlet which made a JDBC query and returned a ResultSet.
However, on win 98 it crashed the JVM.
The method signature was something like this:
public ResultSet returnQueryResults() {...}
This method was using the JDBC-ODBC driver to get
the connection to the DB, executing the query using
a Statement and then returning the ResultSet reference.
Thanks.
- madhav
 
Rahul Agarwal
Ranch Hand
Posts: 52
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I don't think that there is any problem
in returning a ResultSet reference.
Your JVM must hava crashed because
of some other reason
 
Happiness is not a goal ... it's a by-product of a life well lived - Eleanor Roosevelt. Tiny ad:
the new thread boost feature: great for the advertiser and smooth for the coderanch user
https://coderanch.com/t/674455/Thread-Boost-feature
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!