Date fields with default = now() in MS Access fail on MYSQL

General usage of Access to MySQL

Moderator: jr

Post Reply
basementjack
Posts: 8
Joined: Tue Mar 30, 2010 8:48 pm

Date fields with default = now() in MS Access fail on MYSQL

Post by basementjack »

I came across a situation when trying to convert my Access database.

The create tables generated had statements like
Create table xxxx (
entrydate DATETIME NOT NULL DEFAULT 'now()',
xxx
xxx
)

The create table statement fails, because the default value is invalid.
Is it possible to have an option to convert these to
entrydate TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP


?

I'd assume something similar probably would benefit the Access to MSSQL product as I think it needs GetDate() instead of Now()

If the source of this is available, I'd be happy to rough in the code and submit it back up.

- Jack
jr
Site Admin
Posts: 500
Joined: Sun Mar 26, 2006 12:28 pm

Re: Date fields with default = now() in MS Access fail on MYSQL

Post by jr »

Hi,

This will be fixed in the next version.

Regards,
Jacob
jr
Site Admin
Posts: 500
Joined: Sun Mar 26, 2006 12:28 pm

Re: Date fields with default = now() in MS Access fail on MYSQL

Post by jr »

This has now been released :-)

/Jacob
Post Reply