File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes Spring and the fly likes JDBCtemplate.queryForList()  issue Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Frameworks » Spring
Bookmark "JDBCtemplate.queryForList()  issue" Watch "JDBCtemplate.queryForList()  issue" New topic

JDBCtemplate.queryForList() issue

Joe Robles

Joined: Jan 13, 2009
Posts: 11
Hi all,

I am using org.apache.commons.dbcp.BasicDataSource for database connection and Spring JDBCtemplate.queryForList() with a preparedStatement. The preparedstatment does not return data when I pass a string as below thought there is data in the database. The query works for other integer values that are passed. I am not clear as what I am missing here.

Any help is highly appreciated.

Thanks in advance.

Eduardo Bueno
Ranch Hand

Joined: Jun 04, 2009
Posts: 155
Your preparedStatement is responsible to know the parameter types; post it's code.
I agree. Here's the link:
subject: JDBCtemplate.queryForList() issue
It's not a secret anymore!