File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
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 Java Interview Guide this week in the Jobs Discussion forum!
JavaRanch » Java Forums » Frameworks » Spring
Bookmark "Error inserting into database" Watch "Error inserting into database" New topic

Error inserting into database

manjiri chunekar

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

Joined: Jan 08, 2009
Posts: 1584

thugh it gives same error...

What error does it show?

Mark Spritzler

Joined: Feb 05, 2001
Posts: 17276

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.


Perfect World Programming, LLC - iOS Apps
How to Ask Questions the Smart Way FAQ
I agree. Here's the link:
subject: Error inserting into database
It's not a secret anymore!