Skip to Main Content

Java EE (Java Enterprise Edition) General Discussion

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Prepared statement for date query

861530Jul 25 2011 — edited Jul 25 2011
Using preparedstatement is it possible to insert the values for date using setDate() mehtod ?

eg:-
String sql = "Select name from table where testDate between ? and ?";

pstmt.setDate(date);
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Aug 22 2011
Added on Jul 25 2011
2 comments
1,187 views