Using A Java.sql.timestamp Object In An Sql Query
I am trying to run a query in java that uses a java.sql.Timestamp object as the date to compare with in the where clause. Here is how the query string that is built in Java Strin
Solution 1:
Use PreparedStatement: http://download.oracle.com/javase/6/docs/api/java/sql/PreparedStatement.html
Never use string concatenation to pass arguements to SQL commands (security risk: SQL injection)!
Post a Comment for "Using A Java.sql.timestamp Object In An Sql Query"