Click here to Skip to main content
15,887,429 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
how can I insert date value from JXDatePicker to Oracle Db?

What I have tried:

con = DriverManager.getConnection(conString, usrName, pass);
PreparedStatement pst = con.prepareStatement("INSERT INTO myTable VALUES(?)");
int r = 0;
pst.setDate(1, new java.sql.Date(new java.util.Date(jXDatePicker1.getDate()));
}
r = pst.executeUpdate();
con.close();
pst.close();
Posted
Comments
Ma'd Saeed 4-Apr-16 16:53pm    
When I execute this code, it says "null"!!

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900