I'm using MSAccess and
java and I'm trying to do something like this:
ps = connection.prepareStatement("UPDATE table SET int_1 = ?, int_2 = ?, string_1 = ?, date_1 = ? WHERE id = ?");
ps.setInt(1, 1);
ps.setInt(2, 2);
ps.setString(3, "aString");
Calendar rightNow1 = Calendar.getInstance();
rightNow1.set(rightNow1.MILLISECOND,0);
java.util.Date tempDate1 = rightNow1.getTime();
Timestamp sysDate1 = new Timestamp(tempDate1.getTime());
ps.setTimestamp(4, sysDate1);
and I get:
Microsoft][ODBC Microsoft Access Driver] Syntax error in INSERT INTO statement
please help...