• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Tim Cooke
  • Liutauras Vilda
  • Jeanne Boyarsky
  • paul wheaton
Sheriffs:
  • Ron McLeod
  • Devaka Cooray
  • Henry Wong
Saloon Keepers:
  • Tim Holloway
  • Stephan van Hulst
  • Carey Brown
  • Tim Moores
  • Mikalai Zaikin
Bartenders:
  • Frits Walraven

return book

 
Greenhorn
Posts: 11
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
 
Rancher
Posts: 43081
77
  • Likes 1
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
    Number of slices to send:
    Optional 'thank-you' note:
  • 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: 43081
77
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
*Are* the values you're using null? How have you made sure that they are not?
 
Bartender
Posts: 1810
28
jQuery Netbeans IDE Eclipse IDE Firefox Browser MySQL Database Chrome Linux
  • Likes 1
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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.

 
Don't touch me. And dont' touch this tiny ad:
Gift giving made easy with the permaculture playing cards
https://coderanch.com/t/777758/Gift-giving-easy-permaculture-playing
reply
    Bookmark Topic Watch Topic
  • New Topic