By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
435,157 Members | 1,001 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 435,157 IT Pros & Developers. It's quick & easy.

how to refresh the resultset

P: n/a
hi guys, i get an updatable resultset from a connection then used it
to insert a new row but the result set doesn't chane after insertion,
i mean the no of rows before insertion is the same after insertion and
also the data, this is the code prove what i say

int currentRow = resultset.getRow();
display(resultset);
resultset.moveToInsertRow();
for (int i = 0; i < fields.size(); i++)
{
updateCurrentRow(resultset, fields.getField(i));
}
resultset.insertRow();
display(resultset);

the display function body is

int currentRow = res.getRow();
res.first();
while (true)
{
System.out.println("CountyCode= " + res.getInt(1));
System.out.println("CountyName= " + res.getString(2));
if (!res.next())
break;
}
res.absolute(currentRow);

Please help me

N.B.
the type of resultset after creation it is res.getConcurrency() ==
ResultSet.CONCUR_UPDATABLE?????

Thanks for your efforts
Jul 17 '05 #1
Share this question for a faster answer!
Share on Google+

This discussion thread is closed

Replies have been disabled for this discussion.