Win a copy of Think Java: How to Think Like a Computer Scientist this week in the Java in General forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Error inserting into database

 
manjiri chunekar
Greenhorn
Posts: 13
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks for guiding me...
I saw that links...
but my problem is not solved yet...

I changed crete funcn



thugh it gives same error...
what to do...
i do seperate assignment for 1 query i.e select...
it runs, shows data....
 
Swastik Dey
Rancher
Posts: 1604
5
Android Java Java ME
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
thugh it gives same error...


What error does it show?
 
Mark Spritzler
ranger
Sheriff
Posts: 17278
6
IntelliJ IDE Mac Spring
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
If you are doing an insert or update, the jdbc template method is update(); And it does not return a List, just an int for the number of rows that were updated/inserted. That would be all you need for an update or insert statement.

Also, why you have all that JDBC code below it is completely unnecessary.

Mark
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic