Setting null to date field from Delphi.
Setting null to date field from Delphi.
am 02.05.2007 12:16:08 von Terry Yapt
I am working with Delphi 2006 and pgsql-odbc driver 8.02.02.00 to
8.02.04.00.
I am trying to set a date field to null. In spite of the boolean value
of 'Dataset.FieldByName('datefield').isnull' is returning true
(onBeforePost event), PostgreSQL is complaining with error: 22008 and
showing the date: '0001-00-00' as the wrong date value.
If someone have any idea it would be very appreciated.
Thanks.
---------------------------(end of broadcast)---------------------------
TIP 6: explain analyze is your friend
Re: Setting null to date field from Delphi.
am 04.05.2007 10:00:06 von mjuan
Hi,
have a look to the class TParam: TParam.Clear ,TParam.Bound and ftDate
Regards
Miguel Juan
----- Original Message -----
From: "Terry Yapt"
To:
Sent: Wednesday, May 02, 2007 12:16 PM
Subject: [ODBC] Setting null to date field from Delphi.
>I am working with Delphi 2006 and pgsql-odbc driver 8.02.02.00 to
> 8.02.04.00.
>
> I am trying to set a date field to null. In spite of the boolean value
> of 'Dataset.FieldByName('datefield').isnull' is returning true
> (onBeforePost event), PostgreSQL is complaining with error: 22008 and
> showing the date: '0001-00-00' as the wrong date value.
>
> If someone have any idea it would be very appreciated.
>
> Thanks.
>
> ---------------------------(end of broadcast)---------------------------
> TIP 6: explain analyze is your friend
>
---------------------------(end of broadcast)---------------------------
TIP 6: explain analyze is your friend
Re: Setting null to date field from Delphi.
am 15.05.2007 09:11:02 von Terry Yapt
Thanks but I am working with TDataSets.
As I said:
Dataset.FieldByName('datefield').isnull is returning TRUE but when I do
a post to Database then PostgreSQL complaint with error: 22008.
Any another idea ?
Thanks...
"Miguel Juan" wrote:
> Hi,
>
> have a look to the class TParam: TParam.Clear ,TParam.Bound and
> ftDate
>
> Regards
>
> Miguel Juan
> ----- Original Message ----- From: "Terry Yapt"
> To:
> Sent: Wednesday, May 02, 2007 12:16 PM
> Subject: [ODBC] Setting null to date field from Delphi.
>
>
> > I am working with Delphi 2006 and pgsql-odbc driver 8.02.02.00 to
> > 8.02.04.00.
> >
> > I am trying to set a date field to null. In spite of the boolean
> > value of 'Dataset.FieldByName('datefield').isnull' is returning
> > true (onBeforePost event), PostgreSQL is complaining with error:
> > 22008 and showing the date: '0001-00-00' as the wrong date value.
> >
> > If someone have any idea it would be very appreciated.
> >
> > Thanks.
> >
> > ---------------------------(end of
> > broadcast)--------------------------- TIP 6: explain analyze is
> > your friend
> >
>
>
>
> ---------------------------(end of
> broadcast)--------------------------- TIP 6: explain analyze is your
> friend
--
---------------------------(end of broadcast)---------------------------
TIP 9: In versions below 8.0, the planner will ignore your desire to
choose an index scan if your joining column's datatypes do not
match
Re: Setting null to date field from Delphi.
am 15.05.2007 09:14:52 von Terry Yapt
Thanks but I am working with TDataSets not a TQuery.=20
As I said:
Dataset.FieldByName('datefield').isnull is returning TRUE but when I do
a post to Database then PostgreSQL complaint with error: 22008.
Any another idea ?
Thanks...
>>
>>
>> Miguel Juan escribi=F3:
>>> Hi,
>>>
>>> have a look to the class TParam: TParam.Clear ,TParam.Bound and=20
>>> ftDate
>>>
>>> Regards
>>>
>>> Miguel Juan
>>> ----- Original Message ----- From: "Terry Yapt"
>>> To:
>>> Sent: Wednesday, May 02, 2007 12:16 PM
>>> Subject: [ODBC] Setting null to date field from Delphi.
>>>
>>>
>>>> I am working with Delphi 2006 and pgsql-odbc driver 8.02.02.00 to=20
>>>> 8.02.04.00.
>>>>
>>>> I am trying to set a date field to null. In spite of the boolean=20
>>>> value of 'Dataset.FieldByName('datefield').isnull' is returning=20
>>>> true (onBeforePost event), PostgreSQL is complaining with error:=20
>>>> 22008 and showing the date: '0001-00-00' as the wrong date value.
>>>>
>>>> If someone have any idea it would be very appreciated.
>>>>
>>>> Thanks.
>>>>
>>>> ---------------------------(end of=20
>>>> broadcast)---------------------------
>>>> TIP 6: explain analyze is your friend
>>>>
>>>
>>>
>>>
>>
>>
>
>
>
---------------------------(end of broadcast)---------------------------
TIP 2: Don't 'kill -9' the postmaster
Re: Setting null to date field from Delphi.
am 15.05.2007 16:16:55 von Terry Yapt
Hello Alvaro and thanks for your answer...
I am using PostgreSQL 8.2.4 DB and I don't know if using previous odbc=20
versions is an option. (ie: Schemas might be a problem I think).
I agree with you that odbc 8.x.xx has a lot of "rare behaviours" and I=20
am seriously thinking to get off odbc and buy direct access components=20
VCL from MicroOlap or something similar:
MicroOlap: http://www.microolap.com/products/connectivity/postgresdac/
I am spending more time checking behaviours and looking for workarounds=20
than developing software itself.
Do you know any other direct postgresql access for VCL besides=20
postgresDAC ?
Thanks.
Greetings from Spain...
ALVARO ARCILA escribi=F3:
> =20
> Hi,
> =20
> Actually I'm working with Delphi accessing postgresql and I've had=20
> some kind of problems with recents versions of postgresql odbc....
> I've got the better results with version 7.03.100 ... maybe you can=20
> switch to this version and try ...
>
> I hope this would help you,
> =20
> Alvaro Arcila
>
>
> ------------------------------------------------------------ -----------=
-
>
> > Date: Tue, 15 May 2007 09:14:52 +0200
> > From: yapt@technovell.com
> > To: pgsql-odbc@postgresql.org
> > Subject: Re: [ODBC] Setting null to date field from Delphi.
> >
> > Thanks but I am working with TDataSets not a TQuery.
> >
> > As I said:
> > Dataset.FieldByName('datefield').isnull is returning TRUE but when I =
do
> > a post to Database then PostgreSQL complaint with error: 22008.
> >
> > Any another idea ?
> >
> > Thanks...
> >
> > >>
> > >>
> > >> Miguel Juan escribi=F3:
> > >>> Hi,
> > >>>
> > >>> have a look to the class TParam: TParam.Clear ,TParam.Bound and
> > >>> ftDate
> > >>>
> > >>> Regards
> > >>>
> > >>> Miguel Juan
> > >>> ----- Original Message ----- From: "Terry Yapt"=20
>
> > >>> To:
> > >>> Sent: Wednesday, May 02, 2007 12:16 PM
> > >>> Subject: [ODBC] Setting null to date field from Delphi.
> > >>>
> > >>>
> > >>>> I am working with Delphi 2006 and pgsql-odbc driver 8.02.02.00 t=
o
> > >>>> 8.02.04.00.
> > >>>>
> > >>>> I am trying to set a date field to null. In spite of the boolean
> > >>>> value of 'Dataset.FieldByName('datefield').isnull' is returning
> > >>>> true (onBeforePost event), PostgreSQL is complaining with error:
> > >>>> 22008 and showing the date: '0001-00-00' as the wrong date value=
..
> > >>>>
> > >>>> If someone have any idea it would be very appreciated.
> > >>>>
> > >>>> Thanks.
> > >>>>
> > >>>> ---------------------------(end of
> > >>>> broadcast)---------------------------
> > >>>> TIP 6: explain analyze is your friend
> > >>>>
> > >>>
> > >>>
> > >>>
> > >>
> > >>
> > >
> > >
> > >
> >
> >
> > ---------------------------(end of broadcast)------------------------=
---
> > TIP 2: Don't 'kill -9' the postmaster
>
>
> ------------------------------------------------------------ -----------=
-
> =A1Ya est=E1 aqu=ED Windows Live Spaces! Ahora podr=E1s crear f=E1cilme=
nte tu=20
> propio sitio Web. Pru=E9balo
---------------------------(end of broadcast)---------------------------
TIP 4: Have you searched our list archives?
http://archives.postgresql.org
Re: Setting null to date field from Delphi.
am 15.05.2007 16:39:28 von Rod
On 15/05/2007 15:16, Terry Yapt wrote:
> Do you know any other direct postgresql access for VCL besides
> postgresDAC ?
I use dbExpress and the Vita Voom driver for PostgreSQL
(www.vitavoom.com) - it's a commercial driver but reasonably proced, and
works very well.
Ray.
------------------------------------------------------------ ---
Raymond O'Donnell, Director of Music, Galway Cathedral, Ireland
rod@iol.ie
------------------------------------------------------------ ---
---------------------------(end of broadcast)---------------------------
TIP 7: You can help support the PostgreSQL project by donating at
http://www.postgresql.org/about/donate
Re: Setting null to date field from Delphi.
am 15.05.2007 16:42:25 von Rod
On 15/05/2007 15:39, Raymond O'Donnell wrote:
> reasonably proced
Oops - that should have been "priced". :-)
Ray.
------------------------------------------------------------ ---
Raymond O'Donnell, Director of Music, Galway Cathedral, Ireland
rod@iol.ie
------------------------------------------------------------ ---
---------------------------(end of broadcast)---------------------------
TIP 5: don't forget to increase your free space map settings
Re: Setting null to date field from Delphi.
am 25.05.2007 13:15:14 von Ben.Trewern
Try ZeosLib here: http://forum.zeoslib.net.ms/
They work well (with a few quirks) and are LGPL free. Use the 6.6.1-beta
versions as they seem to be more stable than a beta.
Regards,
Ben
""Raymond O'Donnell"" wrote in message
news:4649C620.7060500@iol.ie...
> On 15/05/2007 15:16, Terry Yapt wrote:
>
>> Do you know any other direct postgresql access for VCL besides
>> postgresDAC ?
>
> I use dbExpress and the Vita Voom driver for PostgreSQL
> (www.vitavoom.com) - it's a commercial driver but reasonably proced, and
> works very well.
>
> Ray.
>
> ------------------------------------------------------------ ---
> Raymond O'Donnell, Director of Music, Galway Cathedral, Ireland
> rod@iol.ie
> ------------------------------------------------------------ ---
>
> ---------------------------(end of broadcast)---------------------------
> TIP 7: You can help support the PostgreSQL project by donating at
>
> http://www.postgresql.org/about/donate
>
---------------------------(end of broadcast)---------------------------
TIP 2: Don't 'kill -9' the postmaster