Win a copy of Murach's Python Programming this week in the Jython/Python forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

return book  RSS feed

 
sarathd kumar
Greenhorn
Posts: 11
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
hi..
i'm doing library management project this module is return book.



i need to save the which book are return and update the status like this...



But i get error like this..

Query===com.mysql.jdbc.ServerPreparedStatement[2] - insert into returns values (null,null,null,0,null,0)
Query===com.mysql.jdbc.ServerPreparedStatement[3] - delete from issues where isbn = null
Query===com.mysql.jdbc.ServerPreparedStatement[4] - update books set status='a' where isbn = null

please help me...and thanks
 
Ulf Dittmer
Rancher
Posts: 42970
73
  • Likes 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
That looks like debugging output to me, not like error messages. What happens if you run this code, and how specifically is that different from what you expected. Also check the DB directly to see if anything is inserted, updated or deleted.
 
sarathd kumar
Greenhorn
Posts: 11
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
yes it insert only null value
how can i get the values from on it
thanks
 
Ulf Dittmer
Rancher
Posts: 42970
73
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
*Are* the values you're using null? How have you made sure that they are not?
 
J. Kevin Robbins
Bartender
Posts: 1801
28
Chrome Eclipse IDE Firefox Browser jQuery Linux MySQL Database Netbeans IDE
  • Likes 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
That's probably not a valid insert statement. A SQL insert looks like this.

What you have only works if a value is specified for every column. If you skip even one column, they all default to null. Are you accounting for all columns?
Use a tool like WinSQL to test your SQL statements.

But more importantly, get rid of that awful scriptlet code. Java code does not belong in a jsp file. Please read this article to find out the proper way to structure a web application.

 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!