File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

JDBCtemplate.queryForList() issue

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