I am struggling to insert this date into the moviesTbl
. I am expected to do this without a preparedstatement. When I tried the below I received the error:
Exception in thread "main" net.ucanaccess.jdbc.UcanaccessSQLException: user lacks privilege or object not found: RELEASED
Here is the code:
String date = "2012-12-28";
java.sql.Date released = java.sql.Date.valueOf(date);
qtd.update("insert into moviesTbl (Title, ReleaseDate, Genre) VALUES ('Harry Potter', released, 'drama')");
How do I insert a date without a prepared statement?