Page 1 of 1

DBEdit Component Not Updating Date Field in Database..

Posted: Tue 17 Mar 2009 02:32
by cnmcdee
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.

Posted: Tue 17 Mar 2009 13:06
by Challenger
You should set the Date value according to the Windows regional settings.

Posted: Wed 18 Mar 2009 00:25
by cnmcdee
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?

Posted: Wed 18 Mar 2009 01:31
by cnmcdee
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.

Posted: Sun 22 Mar 2009 20:21
by jkuiper
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.