开发者

Data type not found error in JDBC connection in java?

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.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜