This week's book giveaway is in the Servlets forum.
We're giving away four copies of Murach's Java Servlets and JSP and have Joel Murach on-line!
See this thread for details.
The moose likes Spring and the fly likes Error inserting into database Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Murach's Java Servlets and JSP this week in the Servlets forum!
JavaRanch » Java Forums » Frameworks » Spring
Bookmark "Error inserting into database" Watch "Error inserting into database" New topic
Author

Error inserting into database

manjiri chunekar
Greenhorn

Joined: Apr 08, 2011
Posts: 13
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

Joined: Jan 08, 2009
Posts: 1449
    
    6

thugh it gives same error...


What error does it show?


Swastik
Mark Spritzler
ranger
Sheriff

Joined: Feb 05, 2001
Posts: 17249
    
    6

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


Perfect World Programming, LLC - Two Laptop Bag - Tube Organizer
How to Ask Questions the Smart Way FAQ
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
 
subject: Error inserting into database
 
Similar Threads
NULL pointer exception.
Transaction not rolled back on a JDBC manual commit / Spring transaction / MySQL InnoDB
insert query not executing..
Integration test on JDBC (No Hibernate !) and Spring AbstractTransactionalJUnit4SpringContextTests
Pool connection leak error