• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

PreparedStatement

 
John Paterson
Ranch Hand
Posts: 171
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Guys,

Posted this in another forum, no solution yet so decided to post it here as well.
I am using PreparedStatement's setString method to set values for the start and end dates in a sql query.




The values however are not being set. I understand that normally there is an equals sign:


How do I than call setString method when I am using a 'Between' operator in the sql statement? Hope someone can advise. Thank you.
 
Paul Clapham
Sheriff
Posts: 21554
33
Eclipse IDE Firefox Browser MySQL Database
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
John Paterson wrote:The values however are not being set.


What makes you think so? Are you getting an error message at some point in the process? If so, what did it say?

(By the way, can you post a link to your question in the other forum? That might help people answer your question a bit better.)
 
John Paterson
Ranch Hand
Posts: 171
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Paul,

I am receiving some responses in the other forum. They are basically saying I should be using setDate instate of setString. I am looking through those messages. The link is as follow:
http://stackoverflow.com/questions/26581134/preparedstatement
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic