File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes Spring and the fly likes Error inserting into database Big Moose Saloon
  Search | Java FAQ | Recent Topics
Register / Login
JavaRanch » Java Forums » Application Frameworks » Spring
Reply 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
Ranch Hand

Joined: Jan 08, 2009
Posts: 990

thugh it gives same error...


What error does it show?


Swastik
Mark Spritzler
ranger
Sheriff

Joined: Feb 05, 2001
Posts: 16624

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
 
 
subject: Error inserting into database
 
Threads others viewed
Pool connection leak error
insert query not executing..
Transaction not rolled back on a JDBC manual commit / Spring transaction / MySQL InnoDB
Integration test on JDBC (No Hibernate !) and Spring AbstractTransactionalJUnit4SpringContextTests
NULL pointer exception.
WebSphere development made easy
without the weight of IBM tools
http://www.myeclipseide.com

cast iron skillet 49er

more from paul wheaton's glorious empire of web junk: cast iron skillet diatomaceous earth rocket mass heater sepp holzer raised garden beds raising chickens lawn care CFL flea control missoula heat permaculture