Forums Register Login

Result Set .Code check please

+Pie Number of slices to send: Send
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.
+Pie Number of slices to send: Send
Gorakshanath,
It would be better if you closed the resultset before assigning it a new value. Other than that, you should be ok.
Getting married means "We're in love, so let's tell the police!" - and invite this tiny ad to the wedding:
a bit of art, as a gift, the permaculture playing cards
https://gardener-gift.com


reply
reply
This thread has been viewed 788 times.
Similar Threads
Passing array of objects......ResultSet
Resultset Problem
set the values
datearray
how to get number of months between two given dates in java
More...

All times above are in ranch (not your local) time.
The current ranch time is
Mar 28, 2024 09:20:27.