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 

Setting SQL Server 2000 datetime

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





PostPosted: Fri May 11, 2007 7:32 pm    Post subject: Setting SQL Server 2000 datetime Reply with quote



How do you set a datetime column in SQL Server to null/blank?

I'm using a TADOTable.FieldByName('MyField').AsDateTime := ?

If set to zero, it comes back with a time.

Thanks,

Tom
Back to top
yannis
Guest





PostPosted: Fri May 11, 2007 7:58 pm    Post subject: Re: Setting SQL Server 2000 datetime Reply with quote



Tom Woods was thinking very hard :
Quote:
How do you set a datetime column in SQL Server to null/blank?

I'm using a TADOTable.FieldByName('MyField').AsDateTime := ?

If set to zero, it comes back with a time.

Thanks,

Tom

try

TADOTable.FieldByName('MyField').Clear;

Regards
Yannis.
Back to top
Tom Woods
Guest





PostPosted: Fri May 11, 2007 8:13 pm    Post subject: Re: Setting SQL Server 2000 datetime Reply with quote



That did the trick!

Thanks,
Tom

"yannis" <none (AT) noware (DOT) non> wrote in message
news:mn.5c367d75a4bc3e5a.0 (AT) noware (DOT) non...
Quote:
Tom Woods was thinking very hard :
How do you set a datetime column in SQL Server to null/blank?

I'm using a TADOTable.FieldByName('MyField').AsDateTime := ?

If set to zero, it comes back with a time.

Thanks,

Tom

try

TADOTable.FieldByName('MyField').Clear;

Regards
Yannis.

Back to top
Display posts from previous:   
Post new topic   Reply to topic    BorlandTalk.com Forum Index -> Delphi Databases (ADO) 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.