Reputation: 375
I'm using mysql to develop basic ddl statements but I created table with datatype of timestamp and getting an error as invalid statement for timestamp. And my code is :
ps.setTimestamp(4, m_datetime);
Thanks in advance.
Upvotes: 1
Views: 402
Reputation: 263723
ps.setTimestamp(4, m_datetime);
make sure that m_datetime
has the proper timestamp
format and its data type is java.sql.Timestamp
Upvotes: 3