This week's book giveaway is in the JavaScript forum.
We're giving away four copies of Svelte and Sapper in Action and have Mark Volkmann on-line!
See this thread for details.
Win a copy of Svelte and Sapper in Action this week in the JavaScript forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Ron McLeod
  • Paul Clapham
  • Bear Bibeault
  • Junilu Lacar
Sheriffs:
  • Jeanne Boyarsky
  • Tim Cooke
  • Henry Wong
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Tim Holloway
  • salvin francis
  • Frits Walraven
Bartenders:
  • Scott Selikoff
  • Piet Souris
  • Carey Brown

CONCUR_UPDATABLE

 
Ranch Hand
Posts: 146
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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 ]
     
    sunglasses are a type of coolness prosthetic. Check out the sunglasses on this tiny ad:
    the value of filler advertising in 2020
    https://coderanch.com/t/730886/filler-advertising
      Bookmark Topic Watch Topic
    • New Topic