This week's book giveaway is in the Kotlin forum.
We're giving away four copies of Kotlin in Action and have Dmitry Jemerov & Svetlana Isakova on-line!
See this thread for details.
Win a copy of Kotlin in Action this week in the Kotlin forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

updating records in database  RSS feed

 
Kailash karayat
Greenhorn
Posts: 10
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Sheriff
Posts: 37234
519
Eclipse IDE Java VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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>
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!