DBEdit Component Not Updating Date Field in Database..

Discussion of open issues, suggestions and bugs regarding MyDAC (Data Access Components for MySQL) for Delphi, C++Builder, Lazarus (and FPC)
Post Reply
cnmcdee
Posts: 4
Joined: Thu 26 Feb 2009 04:01

DBEdit Component Not Updating Date Field in Database..

Post by cnmcdee » Tue 17 Mar 2009 02:32

I have a a standard INNOB Mysql Database, and a standard DBEdit Component. All of the fields are updating fine however it will not accept Date Field Updates.

I have tried entering the following into the DBEdit Component which is linked to a Date Field in the Dataset:

2008-02-02
02-02-02
'2008-02-02'

And So forth and so on. It is almost like the DBEdit handler must custom post the data when handling date fields with a custom function?

Any suggestions would be greatly appreciated.

Challenger
Devart Team
Posts: 925
Joined: Thu 17 Nov 2005 10:53

Post by Challenger » Tue 17 Mar 2009 13:06

You should set the Date value according to the Windows regional settings.

cnmcdee
Posts: 4
Joined: Thu 26 Feb 2009 04:01

Post by cnmcdee » Wed 18 Mar 2009 00:25

Can you be a little more explicit by what you mean by that!

Do you mean in the Delphi Compiler, or in the MYSQL database, or in the MYSQL Server settings themselves?

cnmcdee
Posts: 4
Joined: Thu 26 Feb 2009 04:01

Post by cnmcdee » Wed 18 Mar 2009 01:31

Okay, I figured it out - it is the regional settings inside the computer, Start Control Panel - Regional Settings.

That is very interesting, - it must suggest the MyDAC component is actually quite advanced, because as I see it DBEdit is simply a string editing component, and basically a Date field in the Mysql is for all purposes a string component as well.

That is assumptive on my part and I would be the first to admit I have lots to learn, but nonetheless MyDAC must be doing some mangling of the data between them and flagging it if it does not match regional settings.

jkuiper
Posts: 138
Joined: Fri 04 Aug 2006 14:17

Post by jkuiper » Sun 22 Mar 2009 20:21

cnmcdee wrote: Nonetheless MyDAC must be doing some mangling of the data between them and flagging it if it does not match regional settings.
Just use the validate in Delphi.

Post Reply