aspose file tools*
The moose likes JDBC and the fly likes CONCUR_UPDATABLE Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Spring in Action this week in the Spring forum!
JavaRanch » Java Forums » Databases » JDBC
Bookmark "CONCUR_UPDATABLE" Watch "CONCUR_UPDATABLE" New topic
Author

CONCUR_UPDATABLE

ram kumar
Ranch Hand

Joined: May 22, 2008
Posts: 146
Hey JDBC !

I made a code something of this sort

con.createConnection(resultset.TYPE_FORWARD_ONLY,RESULTSET.CONCUR_UPDATABLE)

For getting updatable result sets

Came to know ! that every other result set like con.createConnection();

is READ_ONLY !


My requirement is :

I have to read all the columns in a row one by one and update a column in that row named ROW_STATUS !

Code Snippet


Am not sure of what happens exactly ! behind the scene !

Is JDBC generating queries for updating rows.

AnyHow, to my knowledge a copy of the resultset will be maintained in the JVM.

I think when i say

resultset.updateString("ROW_STATUS","Y")

this local copy is updated !

Only when i say updateRow(); this gets updated to DB!

How come resultset.getString("ROW_STATUS");

immediately would say Y

:roll:
  • Is that from the DB or from the Local copy maintained in the JVM.
  • If not, is the JDBC, writes queries to retrive the column ROW_STATUS
  • when i say resultset.getString("ROW_STATUS")


  • What Happens Exactly !

    Could someone describe in detail the working of this code !

    Please correct me if am not in the right direction !

    [ September 22, 2008: Message edited by: ram kumar ]
    [ September 22, 2008: Message edited by: ram kumar ]

    Discussion - the powerfull way to excellence!
     
     
    subject: CONCUR_UPDATABLE