Granny's Programming Pearls
"inside of every large program is a small program struggling to get out"
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
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: 1527

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!