BorlandTalk.com Forum Index BorlandTalk.com
Borland discussion newsgroups
 
Archives   FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

How to set a SQLTimeStampFiled to Null?

 
Post new topic   Reply to topic    BorlandTalk.com Forum Index -> Delphi Databases (dbExpress)
View previous topic :: View next topic  
Author Message
Lasse
Guest





PostPosted: Mon Apr 12, 2004 2:29 pm    Post subject: How to set a SQLTimeStampFiled to Null? Reply with quote



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





PostPosted: Mon Apr 12, 2004 2:51 pm    Post subject: Re: How to set a SQLTimeStampFiled to Null? Reply with quote




"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





PostPosted: Tue Apr 13, 2004 12:24 am    Post subject: Re: How to set a SQLTimeStampFiled to Null? Reply with quote



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
Display posts from previous:   
Post new topic   Reply to topic    BorlandTalk.com Forum Index -> Delphi Databases (dbExpress) All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2006 phpBB Group
SEO toolkit © 2004-2006 webmedic.