开发者

Data type not found error in JDBC connection in java?

开发者 https://www.devze.com 2022-12-20 20:12 出处:网络
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..

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

精彩评论

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