G
Guest
A DateTimePicker control on my form is bound to a datetime field in a
DataTable.
When inserting a new record the default value for DateTimePicker is today's
date.
However, unless the user changes this date it is not saved to database (NULL
is stored instead of today's date). Text fields are stored normally.
A TextBox control has similar behavior: if the user leaves
a text box blank, NULL is sent to database, but if he enters
some text and then deletes it, an empty string is stored.
It seems that there is some "Modified" property for every control.
In this case I want to store the current date instead of NULL.
How can I achive this?
DataTable.
When inserting a new record the default value for DateTimePicker is today's
date.
However, unless the user changes this date it is not saved to database (NULL
is stored instead of today's date). Text fields are stored normally.
A TextBox control has similar behavior: if the user leaves
a text box blank, NULL is sent to database, but if he enters
some text and then deletes it, an empty string is stored.
It seems that there is some "Modified" property for every control.
In this case I want to store the current date instead of NULL.
How can I achive this?