• Post Reply Bookmark Topic Watch Topic
  • New Topic

Result Set .Code check please  RSS feed

 
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: 36656
475
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.
 
Don't get me started about those stupid light bulbs.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!