• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Unable to update data into database

 
rajnish patel
Ranch Hand
Posts: 56
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi, I've developed a CRUD application and it is working but I am not able to update data which is already inserted. Here is my code, tell me if any other file is needed..

I am pasting error below








Error
 
E Armitage
Rancher
Posts: 989
9
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
The error says that line 55 threw a number format exception. So that means that the value of monu variable is not a valid number at that point and an exception is thrown which results in none of your edit code being called on the DAO.
 
rajnish patel
Ranch Hand
Posts: 56
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
E Armitage wrote:The error says that line 55 threw a number format exception. So that means that the value of monu variable is not a valid number at that point and an exception is thrown which results in none of your edit code being called on the DAO.



thank you for reply sir,
well I am a beginner and this is my UserDAO file,
can you please suggest me changes needed ??


UserDAO.java
 
E Armitage
Rancher
Posts: 989
9
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
The error came up in the servlet not in the user dao. You can find out where the error was thrown by looking at the line numbers printed out in the stack trace. It says . So the value passed to Long.parseLong at that line is not a number.
 
rajnish patel
Ranch Hand
Posts: 56
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
E Armitage wrote:The error came up in the servlet not in the user dao. You can find out where the error was thrown by looking at the line numbers printed out in the stack trace. It says . So the value passed to Long.parseLong at that line is not a number.


I solved that error,
Now I am not getting any error, and page is redirected to view portion, but data is not updated....
Now what ?
 
E Armitage
Rancher
Posts: 989
9
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Again check the server logs for any errors.
 
rajnish patel
Ranch Hand
Posts: 56
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
E Armitage wrote:Again check the server logs for any errors.



but sir this time m not getting any kind of errors......
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic