I want to insert a date record to an Access database. Here is my code:
cmd.CommandText = "INSERT INTO AlarmHistory(Date) VALUES ('6/8/2012')";
cmd.ExecuteNonQuery();
It gives Syntax error in INSERT INTO statement. error at second row.
The screenshot that show my cell data type on db is below.

Use parameters
This will preserve your code from SqlInjection and you could stop to worry about quoting your values-
Just tried creating a dummy database. It’s the Date Field. You should enclose in square brackets because
Dateis a reserved keywordHere the list of the reserved keywords for Jet 4.0