wood burning stoves 2.0*
The moose likes JDBC and the fly likes updating records in database Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Databases » JDBC
Bookmark "updating records in database" Watch "updating records in database" New topic
Author

updating records in database

Kailash karayat
Greenhorn

Joined: Jun 22, 2012
Posts: 10
hi all,

i have a small doubt in one of my application, i am working on an online examination system.
i want to know how to update record in database.

the database has four columns (question_id,subcode,correctanswer,useranswer)
and the exact problem in updating is:

suppose i have the question id alreay in the database and corresponding user option with it.
but i the option for the qid is changed then it should also reflect in the database.

thanks in advance.
Jeanne Boyarsky
internet detective
Marshal

Joined: May 26, 2003
Posts: 30085
    
149

First you identify which fields uniquely identify the option. Then you write a SQL statement to update the value. Then you add JDBC.

What do you have so far? What are you stuck on>


[Blog] [JavaRanch FAQ] [How To Ask Questions The Smart Way] [Book Promos]
Blogging on Certs: SCEA Part 1, Part 2 & 3, Core Spring 3, OCAJP, OCPJP beta, TOGAF part 1 and part 2
 
It is sorta covered in the JavaRanch Style Guide.
 
subject: updating records in database
 
Similar Threads
A Nagging Doubt About My Search Functionality
Throws EOFException during insertion in db file, and reading back data
Why Post for update and Get Not for update ?
refresh Row not working
Fetching values from database and populating it in drop down and text fields