I am using Microsoft Access database for storing data. In that, I stored date as "DATE/TIME" data type. While getting date from the following code it produces error..
String sql = "Select prev_date from StaffAdvance where Staff_ID='"+date+"'";
ResultSet rs = st.executeQuery(sql);
What is wrong wit开发者_开发知识库h this code?
As you told the type of date object is java.util.Date, change the type to java.sql.Date and try.
精彩评论