Win a copy of Programmer's Guide to Java SE 8 Oracle Certified Associate (OCA) this week in the OCAJP forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

JDBCtemplate.queryForList() issue

 
Joe Robles
Greenhorn
Posts: 11
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 155
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Your preparedStatement is responsible to know the parameter types; post it's code.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic