[Zope] can't store a date in Access database

Tommy Johnson tommy@7x.com
Thu, 25 Oct 2001 10:36:34 -0800

> Is the name of your table really "TableName"?  This seems
> unusual.  You need
> the actual name of the table.

My guess is that TableName was a generic string that represents the table's

>You also probably need to supply the primary
> key or index column value as  well as the date column -
> definitely if there
> is a primary key or an index (there ought to be one, but in Access you can
> get away without a primary key).

If he has it set up that the primary key is an AutoNumber, then you don't
need to provde a value for the primary key.

> Finally, you need to use single quotes instead of double quotes around the
> date value.  Double and single quotes are not interchangable in
> SQL.  So if
> your table is called "fact_table", and its primary key or index column is
> called "the_key" whose value should be 102 for this row, and if the date
> field were called "Date", then you would write
> insert into fact_table (the_key,Date) values (102,'10/24/2001')
> Access will accept this syntax for a dattime field, as I just verified by
> checking.


> If you mean to be changing an existing date value, you need to
> use an update statement instead.

True here too, but here is where you'll need a primary key value for your
where clause. (Actually, you don't NEED it, but you will need to provide
some field value for a where clause - unless you are updating every record
in the table to have the same date. *Not likely*)

*Whoa* Proud of myself that I didn't get on the *What are you using Access
for* bandwagon! LOL.

Innovation: The Best Way To Predict The Future ... Is To Create It.