# Miscellaneous > Database Programming >  How do I add a dated record to my Access database?

## Troy Brown

I cannot get aspDB to add a new record which includes a date.  I am using an access database.  If I leave the date blank, the records inserts into the table.  If I try a date I get the following error:

Error # (Edit_Execute_SQL) = 80040E14(-2147217900)
Description = [Microsoft][ODBC Microsoft Access Driver] Syntax error in INSERT INTO statement.
Source = Microsoft OLE DB Provider for ODBC Drivers
SQL State = 37000
Native Error = -3502

I have tried formating, timestamping etc.  I have the date field in access set to short time with an input mask of 99/99/0000;0;_ or mm/dd/yyyy

Can anyone help with this issue?

----------


## Mark

Troy,

Most of the time, when you see &#34;Syntax error in INSERT&#34; it is because you are using a Reserved Word in one of your field names.   For example, Access does NOT allow you to have a field name called:

     &#34;Date&#34;, &#34;Date of Sale&#34;, or &#34;On Order&#34;.

Safest way is to use underscores, like this: &#34;Date_Of_Sale&#34;

See Access list of Reserved Words at:
http://www.aspdb.com/docs/aspdbman.htm#TOC_IVB

I hope that helps.

Mark.


------------
Troy Brown at 10/1/00 11:47:00 PM

I cannot get aspDB to add a new record which includes a date.  I am using an access database.  If I leave the date blank, the records inserts into the table.  If I try a date I get the following error:

Error # (Edit_Execute_SQL) = 80040E14(-2147217900)
Description = [Microsoft][ODBC Microsoft Access Driver] Syntax error in INSERT INTO statement.
Source = Microsoft OLE DB Provider for ODBC Drivers
SQL State = 37000
Native Error = -3502

I have tried formating, timestamping etc.  I have the date field in access set to short time with an input mask of 99/99/0000;0;_ or mm/dd/yyyy

Can anyone help with this issue?

----------


## Mark

Troy,

Most of the time, when you see &#34;Syntax error in INSERT&#34; it is because you are using a Reserved Word in one of your field names.   For example, Access does NOT allow you to have a field name called:

     &#34;Date&#34;, &#34;Date of Sale&#34;, or &#34;On Order&#34;.

Safest way is to use underscores, like this: &#34;Date_Of_Sale&#34;

See Access list of Reserved Words at:
http://www.aspdb.com/docs/aspdbman.htm#TOC_IVB

I hope that helps.

Mark.


------------
Troy Brown at 10/1/00 11:47:00 PM

I cannot get aspDB to add a new record which includes a date.  I am using an access database.  If I leave the date blank, the records inserts into the table.  If I try a date I get the following error:

Error # (Edit_Execute_SQL) = 80040E14(-2147217900)
Description = [Microsoft][ODBC Microsoft Access Driver] Syntax error in INSERT INTO statement.
Source = Microsoft OLE DB Provider for ODBC Drivers
SQL State = 37000
Native Error = -3502

I have tried formating, timestamping etc.  I have the date field in access set to short time with an input mask of 99/99/0000;0;_ or mm/dd/yyyy

Can anyone help with this issue?

----------

