This week's book giveaway is in the Artificial Intelligence forum.
We're giving away four copies of Pragmatic AI and have Noah Gift on-line!
See this thread for details.
Win a copy of Pragmatic AI this week in the Artificial Intelligence 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:
  • Jeanne Boyarsky
  • Liutauras Vilda
  • Campbell Ritchie
  • Tim Cooke
  • Bear Bibeault
Sheriffs:
  • Paul Clapham
  • Junilu Lacar
  • Knute Snortum
Saloon Keepers:
  • Ron McLeod
  • Ganesh Patekar
  • Tim Moores
  • Pete Letkeman
  • Stephan van Hulst
Bartenders:
  • Carey Brown
  • Tim Holloway
  • Joe Ess

CONCUR_UPDATABLE  RSS feed

 
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 ]
     
    Don't get me started about those stupid light bulbs.
    • Post Reply Bookmark Topic Watch Topic
    • New Topic
    Boost this thread!