| Author |
Result Set .Code check please
|
Gorakshanath Pandey
Greenhorn
Joined: Feb 25, 2004
Posts: 11
|
|
ResultSet dtrs; String dtsql; while(temprs.next()) { int Fyear=temprs.getInt("fy"); int Fquarter=temprs.getInt("quarter"); dtsql="Select * from ofeis.dss_lfyquarter where fy=" + Fyear + " and quarter=" + Fquarter; dtrs=SelQuery(dtsql,con); //Error:works elsewhere } Is this code OK....I am reassigning the Resultset dtrs for each instance of new Query. Thanks, Gorakshanath Pandey.
|
 |
Jeanne Boyarsky
internet detective
Marshal
Joined: May 26, 2003
Posts: 26200
|
|
Gorakshanath, It would be better if you closed the resultset before assigning it a new value. Other than that, you should be ok.
|
[Blog] [JavaRanch FAQ] [How To Ask Questions The Smart Way] [Book Promos]
Blogging on Certs: SCEA Part 1, Part 2 & 3, Core Spring 3, OCAJP, OCPJP beta, TOGAF part 1 and part 2
|
 |
 |
|
|
subject: Result Set .Code check please
|
|
|