Board index » delphi » how to Clear Date field in Paradox?

how to Clear Date field in Paradox?

how to Clear Date field in Paradox?

FieldTable.Value := Null              => Error
FieldTable.Value := Unasigned     => 30/12/1899  ?????
FieldTable.Value := StrToDate(' ') => Error

 

Re:how to Clear Date field in Paradox?


The same way you set any type of field to null.

DataSet.FieldByName('SomeField').Clear;

or, if you have instantiated field objects at design time using the
fields editor

FieldObjectName.Clear;

On Sat, 23 Nov 2002 19:01:56 -0300, "Beginner" <begin...@begin.com>
wrote:

Quote
>how to Clear Date field in Paradox?

>FieldTable.Value := Null              => Error
>FieldTable.Value := Unasigned     => 30/12/1899  ?????
>FieldTable.Value := StrToDate(' ') => Error

--
Bill (TeamB)
(TeamB cannot respond to questions received via email)

Re:how to Clear Date field in Paradox?


"Bill Todd" <b...@notthis.dbginc.com> escreveu na mensagem
news:emsvtuc4s1fccu4lb9qkhk4ueie0kq48j7@4ax.com...

Quote
> The same way you set any type of field to null.

> DataSet.FieldByName('SomeField').Clear;

why after this, the field get the value : '30/12/1989' ?

Re:how to Clear Date field in Paradox?


Correction : '30/12/1899'

"Beginner" <begin...@begin.com> escreveu na mensagem
news:3ddffee8@newsgroups.borland.com...

Quote
> why after this, the field get the value : '30/12/1989' ?

Re:how to Clear Date field in Paradox?


What database are you using? That is the date that is stored
internally as zero in a Delphi TDateTime variable. Can you show the
code that causes this date to be diaplayed?

On Sat, 23 Nov 2002 20:19:46 -0300, "Beginner" <begin...@begin.com>
wrote:

Quote
>Correction : '30/12/1899'

>"Beginner" <begin...@begin.com> escreveu na mensagem
>news:3ddffee8@newsgroups.borland.com...

>> why after this, the field get the value : '30/12/1989' ?

--
Bill (TeamB)
(TeamB cannot respond to questions received via email)

Re:how to Clear Date field in Paradox?


This happens whenever you try to convert a null/blank date to a TDatetime.
Your help will explain this. Check for it and handle it accordingly.

Quote
"Bill Todd" <b...@notthis.dbginc.com> wrote in message

news:t680uuc6j49144tm88oh7h19uffsj79bns@4ax.com...
Quote
> What database are you using? That is the date that is stored
> internally as zero in a Delphi TDateTime variable. Can you show the
> code that causes this date to be diaplayed?

> On Sat, 23 Nov 2002 20:19:46 -0300, "Beginner" <begin...@begin.com>
> wrote:

> >Correction : '30/12/1899'

> >"Beginner" <begin...@begin.com> escreveu na mensagem
> >news:3ddffee8@newsgroups.borland.com...

> >> why after this, the field get the value : '30/12/1989' ?

> --
> Bill (TeamB)
> (TeamB cannot respond to questions received via email)

Re:how to Clear Date field in Paradox?


You are using Tdatetimepicker, arent you?
Despite the field is indeed cleared, this component will display
'31/12/1899'.
Dont worry about. your field is empty.

Luis Augusto

"Ray Norrish" <nospam...@careervision.co.uknospam> escreveu na mensagem
news:3de045c7@newsgroups.borland.com...

Quote

> This happens whenever you try to convert a null/blank date to a TDatetime.
> Your help will explain this. Check for it and handle it accordingly.

> "Bill Todd" <b...@notthis.dbginc.com> wrote in message
> news:t680uuc6j49144tm88oh7h19uffsj79bns@4ax.com...
> > What database are you using? That is the date that is stored
> > internally as zero in a Delphi TDateTime variable. Can you show the
> > code that causes this date to be diaplayed?

> > On Sat, 23 Nov 2002 20:19:46 -0300, "Beginner" <begin...@begin.com>
> > wrote:

> > >Correction : '30/12/1899'

> > >"Beginner" <begin...@begin.com> escreveu na mensagem
> > >news:3ddffee8@newsgroups.borland.com...

> > >> why after this, the field get the value : '30/12/1989' ?

> > --
> > Bill (TeamB)
> > (TeamB cannot respond to questions received via email)

Other Threads