Meaningless Drivel is fun!
The moose likes JDBC and Relational Databases 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 and Relational Databases
Bookmark "updating records in database" Watch "updating records in database" New topic

updating records in database

Kailash karayat

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
author & internet detective

Joined: May 26, 2003
Posts: 33102

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>

[OCA 8 book] [Blog] [JavaRanch FAQ] [How To Ask Questions The Smart Way] [Book Promos]
Other Certs: SCEA Part 1, Part 2 & 3, Core Spring 3, TOGAF part 1 and part 2
I agree. Here's the link:
subject: updating records in database
It's not a secret anymore!