| View previous topic :: View next topic |
| Author |
Message |
Lasse Guest
|
Posted: Mon Apr 12, 2004 2:29 pm Post subject: How to set a SQLTimeStampFiled to Null? |
|
|
Hi,
I have a grid where users can enter a date but if the user change there mind
they would like to go to that row and blank the date, meaning set it to null
like it was before the user started to edit it.
When I try to set the date to and empty " / / " I get error message
"Invalid input value".
The grid is connected to datasource -> ClientDataSet.
The displatformat for the date column is yyyy-mm-dd and the edit mask is
!99/99/00;1;_
How can I set a date column to Null ?
Thanks
Lasse
|
|
| Back to top |
|
 |
John Herbster Guest
|
Posted: Mon Apr 12, 2004 2:51 pm Post subject: Re: How to set a SQLTimeStampFiled to Null? |
|
|
"Lasse" <NOSPAMlars-ake.makiaho (AT) telia (DOT) com> wrote
| Quote: | How can I set a date column to Null ?
|
If your field allows nulls, then I suggest the "Clear" method.
--JohnH
|
|
| Back to top |
|
 |
Bill Todd (TeamB) Guest
|
Posted: Tue Apr 13, 2004 12:24 am Post subject: Re: How to set a SQLTimeStampFiled to Null? |
|
|
Using masks, particularly with date fields, makes it very difficult to
set the field to null. You can call the field object's clear method.
Another altherative might be to use the OnSetText method to set the
field to null if all it contains is the mask.
--
Bill (TeamB)
(TeamB cannot respond to questions received via email)
|
|
| Back to top |
|
 |
|