This week's book giveaway is in the Agile and Other Processes forum.
We're giving away four copies of The Little Book of Impediments (e-book only) and have Tom Perry on-line!
See this thread for details.
Win a copy of The Little Book of Impediments (e-book only) this week in the Agile and Other Processes forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Result Set .Code check please

 
Gorakshanath Pandey
Greenhorn
Posts: 11
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
author & internet detective
Marshal
Posts: 35279
384
Eclipse IDE Java VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Gorakshanath,
It would be better if you closed the resultset before assigning it a new value. Other than that, you should be ok.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic