| Author |
how to refresh resultset
|
Royal Scorpion
Greenhorn
Joined: Feb 15, 2004
Posts: 1
|
|
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 the display function body is [code] 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
|
 |
Seetesh Hindlekar
Ranch Hand
Joined: Feb 13, 2004
Posts: 244
|
|
Hi, Cld be that the record inserted has not been committed!!! Might as well use the connection.commit() to post the records after inserting. Seetesh
|
 |
Bear Bibeault
Author and ninkuma
Marshal
Joined: Jan 10, 2002
Posts: 56155
|
|
Welcome to the Ranch "Royal Scorpion"! You'll find this forum a great place to seek help on JSP pages, and there aren't many rules you'll have to worry about, but one is that proper names are required. Please take a look at the JavaRanch Naming Policy and change your display name to match it. In particular, your display name must be a first and a last name separated by a space character, and must not be obviously fictitious. Thanks! bear Forum Bartender
|
[Smart Questions] [JSP FAQ] [Books by Bear] [Bear's FrontMan] [About Bear]
|
 |
 |
|
|
subject: how to refresh resultset
|
|
|