Win a copy of The Little Book of Impediments (e-book only) this week in the Agile and Other Processes forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Not inserting in to the database

 
saku haruno
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I coded below code for inserting data into the database table by JSP using MySQL connectivity.



in above code sql4 is not working. please help me to find the error.
 
Claude Moore
Ranch Hand
Posts: 829
7
IBM DB2 Java Netbeans IDE
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
First, never code business logic or data access logic in a jsp page.
Second, your code as it is posted should not even compile... You are looping over two ResultSets, rs and rs2 (line 26) which are declare nowhere. Moreover if I remember well you should call clear parameters method on pst2 at each iteration.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic